I'm using the following code, which I expect would scale the
associated image to fit within the given dimensions of the button:
ImageButton.setMaxHeight(32);
ImageButton.setMaxWidth(32);
ImageButton.setScaleType(ImageView.ScaleType.FIT_CENTER);
editButton.setImageResource(R.drawable.ic_menu_edit);
The image is 64X64 and I was expecting to see 32X32 on the screen.
However, the button draws with the original 64X64 size. I can re-
sample the image down and create a new file but I'm curious why this
approach didn't work.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en