I am using the Xamarin Studio. I have a problem when I try to use an ImageButton
. The problem is that whatever image I use it doesn't fit with the button. The image is too big or too small. Even if I try to resize the button, the image doesn't stretch to be at the same size with the button.
Asked
Active
Viewed 2,369 times
0

Quality Catalyst
- 6,531
- 8
- 38
- 62

user3765498
- 111
- 3
- 7
2 Answers
0
Couple of questions to start with - which version of Xam.Android are you using (stable, beta, alpha) and can you post the code you're currently using?
This solution may help you in any case : Fit Image in ImageButton in Android
0
If you need the image to stretch use scaleType attribute with fitXY like so: try different settings from the visual designer to see the effects
<ImageButton
android:src="@android:drawable/someDrawable"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/imageButton1"
android:scaleType="fitXY" />

Alex.F
- 5,648
- 3
- 39
- 63