title: Draw on canvas is way off in KitKat - works fine on older phones
body: <p>Im working on a function for my learn-to-code app where the users are supposed to be able to put markers on a map (a bitmap in a imageview). I have written something like this (C# in Xamarin): </p>
  
  <pre><code>   map.Touch += delegate(object sender, View.TouchEventArgs e) {
  
              if ((e.Event.Action == MotionEventActions.Down ) &amp;&amp; (e.Event.Action != MotionEventActions.Scroll ) )  {
                  if ((downTime + 300) &gt; e.Event.DownTime) {
                      x = e.Event.GetX();
                      y = e.Event.GetY();
  
                      mutableBitmap = workingBitmap.Copy (Bitmap.Config.Rgb565, true);
                      GC.Collect();
                      c = new Canvas(mutableBitmap);
                      c.DrawBitmap (mutableBitmap, 0, 0, null);
                      c.Translate(0.07f, 0.07f);
                      c.DrawCircle(x, y, 30, paint);
  
                      map.SetImageBitmap(mutableBitmap);
  
  
                  }
                  else 
                      downTime = e.Event.DownTime;
              }
          };
  </code></pre>
  
  <p>On my older Nexus and on a Galaxy S3 this places the marker perfectly on the double tap and everything is well. Both devices are 4.3 or below. But! Then i got it tested on a Nexus 5 with Android 4.4.4. And now the marker is placed in the wrong place. The tester describes it like this: </p>
  
  <p>"The offset changes depending where I tap, but it's not random. The offset is the same when I tap on the same place again.
  Generally, the dot is drawn left of where I tap, and offset increases the further I tap right on the map.
  Additionally, the dot is always closer to the horizontal middle then I want it to be, with the offset here also increasing if I tap further up/down on the image.</p>
  
  <p>So no matter where I tap, I can never get the dot to show on the top/bottom 20%, and right... let's say about 40% of the image.
  But this also means that the dot is complete accurate if I tap on the very left middle.
  And the dot is also on the same location when I view the location on a saved item."</p>
  
  <p>Okay, ive found some threads saying theres a drawing bugg in KitKat, and ive tried offseting it like this after suggestions in threads: </p>
  
  <pre><code> c.Translate(0.07f, 0.07f);
  </code></pre>
  
  <p>Does not work. I have also tried putting my view (a dialog) to software layertype, like this: </p>
  
  <pre><code>   inputView.SetLayerType (Android.Views.LayerType.Software, null);
  </code></pre>
  
  <p>The problem persists. When loading the X and Y and image in a different view, the KitKat Nexus redraws the marker in the same place it put it - and not where it should be. I am having trouble finding good documentations for this, and im also quite the noob. So please, StackOverFlowers, help me! </p>
  
  <p>Edit: My XML: </p>
  
  <pre><code> &lt;HorizontalScrollView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"&gt;
      &lt;ScrollView
          android:id="@+id/scrollIt"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"&gt;
          &lt;ImageView
              android:src="@android:drawable/ic_menu_gallery"
              android:layout_width="1600px"
              android:layout_height="966px"
              android:id="@+id/imageViewMap"
              android:baselineAlignBottom="false"
              android:scrollbars="horizontal" /&gt;
      &lt;/ScrollView&gt;
  &lt;/HorizontalScrollView&gt;
  </code></pre>