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!

To Change any CSS style of an element using JQuery, you normally do this.

With a JQuery UI Button, it is a little different since it is not just one element but a group of HTML tags that make up this button.

To do so, simply get the parent of the JQuery object that you retrieved by id.

So you want to change the drawable image of your CheckBox widget but when you compile the app, the image and the text are almost side by side.

I bet you used the attribute android:button in order to do this. This is the culprit. To change the CheckBox image with your own custom images, use the attribute android:drawableLeft.

But wait! Now, there are 2 CheckBox widget images!

Here is the complete XML code to use your custom CheckBox images as well as increasing the space between the icon and the text.

Related Posts Plugin for WordPress, Blogger...