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.

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.

Here is my XML file to rotate an image in 360 degree movement.

To apply it to the ProgressBar and use it as the moving spinner, do it like this:

I have read some posts in forums that they had issues with the smoothness of the rotating animation. In my case, I did not see any issue with it. Perhaps old versions of the Android operating system contributed as a factor? I tested this with JellyBean and it worked out quite fine.

Related Posts Plugin for WordPress, Blogger...