Custom ProgressBar:
1. Choose a picture
2. Create a rotate-related XML file under drawable
3. Customize a style to introduce a custom style on the control ProgressBar, specifying the rotational speed
Rotate_progressbar.xml under the drawable file
<rotate xmlns:android= "Http://schemas.android.com/apk/res/android"
android:drawable= "@drawable/progressbar3"//pictures of Pickup
android:fromdegrees= "0"
Android:todegrees= "360"
android:pivotx= "50%"
android:pivoty= "50%" >
</rotate>
Custom style:
<style name= "Style_progressbar" >
<item name= "android:indeterminatedrawable" > @drawable/rotate_progressbar</item>
<item name= "Android:minwidth" >76dip</item>
<item name= "Android:maxwidth" >76dip</item>
<item name= "Android:minheight" >76dip</item>
<item name= "Android:maxheight" >76dip</item>
</style>
<progressbar
Android:id= "@+id/progressbar1"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content"
style= "@style/style_progressbar"
Android:indeterminateduration= "/>"//specified speed
Custom ProgressBar are implemented in three ways: animations, custom colors, pictures.
Custom ProgressBar (Picture implementation)