1.indeterminate Mode | Progress bar with no specific progress
1.1 Customizing animation files
[HTML]View Plaincopy
- < ProgressBar
- android:layout_width "wrap_content"
- android:layout_height "wrap_content"
- android:indeterminatedrawable "@drawable/progress_my_style"
- style = "? Android:attr/progressbarstyle"
Note: style= "? Android:attr/progressbarstyle" This is the default style, can be changed
Step2: Create the Progress_my_style.xml file under the Drawable folder: The contents can be as follows:
[HTML] view Plaincopy
- < animated-rotate xmlns:android = "http://schemas.android.com/apk/res/android"
- android:drawable = "@drawable/spinner_color"
- android:pivotx = "50%"
- android:pivoty = "50%"
- />
Attention:
1. android:drawable= "@drawable/spinner_color" here, you need to create a spinner_color.png image under drawable (you can draw the effect (gradient) you think of)
2. progress_my_style.xml file contents refer to D:\andrirod\android-sdk-windows\platforms\android-7\data\res\drawable\ Progress_medium_white.xml file contents, android:framescount and android:frameduratiion are intrinsic properties of the frameworks and cannot be used directly, so omitted)
The above is defined directly in XML, which I define directly in the code:
http://www.52liezheng.com/info/337083.html
http://www.52liezheng.com/info/337085.html
http://www.52liezheng.com/info/337087.html
http://www.52liezheng.com/info/337091.html
http://www.52liezheng.com/info/337089.html
http://www.52liezheng.com/info/340881.html
http://www.52liezheng.com/info/340882.html
http://www.52liezheng.com/info/340883.html
http://www.52liezheng.com/info/340885.html
http://www.52liezheng.com/info/340886.html
http://www.52liezheng.com/info/340887.html
http://www.52liezheng.com/info/340888.html
Android ProgressBar Custom mode, custom mode animation file