The only way to have a custom button like the zoom buttons in Android map is to make one of your own. The way I did this is to have an XML drawable assigned to the ImageButton. It is pretty simple.

Then assign this as background to the ImageButton widget. Your image should be assigned to the source attribute.

That’s it!

The solution to this problem is not to use the android:button attribute of the CheckBox widget. Instead, set it to null as well as the android:background attribute and use android:drawableLeft to assign your custom CheckBox drawable.

Here is the complete sample XML code:

The attribute android:drawablePadding is used to place a gap between the image and the text so this is fairly optional.

Related Posts Plugin for WordPress, Blogger...