title: How to resize imagebutton in android xamarin?
body: <p>I am trying to resize(shrink) imagebutton in .xaml file in xamarin android, but i am getting imagbutton being cut in both top and bottom.Can anyone suggest me how could i shrink image to required size without any cut in image.</p>
  
  <p>i am using visual studio 2015 tool to build android in xamarin</p>
  
  <p>below is my code</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ImageButton xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/myButton"
      android:layout_width="120dip"
      android:layout_height="150dip"
      android:layout_marginTop="50dip"
      android:layout_marginLeft="50dip"
      android:padding="100dip"
      android:src="@drawable/geocursor_pressed" /&gt;
  </code></pre>
  
  <p><strong>EDITED ANSWER</strong>:</p>
  
  <pre><code>these extra 3 things should be added
  
    android:adjustViewBounds="true"
      android:padding="10dp"
      android:scaleType="fitCenter"
  
   By changing padding you can get desired fit of image in button
   Refer Link for more information :    
  </code></pre>
  
  <p><a href="https://stackoverflow.com/questions/15116393/fit-image-in-imagebutton-in-android">Fit Image in ImageButton in Android</a></p>