One, custom circular progress bar style
1. Create a new XML file in the Drawable directory of the Android project as follows:
<?xml version= "1.0" encoding= "Utf-8"?><RotateXmlns:android="Http://schemas.android.com/apk/res/android" android:pivotx="50%" android:pivoty="50%" android:fromdegrees="0" android:todegrees= "the" span class= "attribute" >android:interpolator= "@android: Anim/accelerate_decelerate_ Interpolator "
<--progress bar picture--> <bitmap android:antialias= "true" android:filter= "true" span class= "attribute" >android:src= "@drawable/loading360"/></ROTATE>
2. Call
< android:layout_width= "wrap_content"android:layout_height="Wrap_content" android:indeterminatedrawable="@drawable/progressbar1"/>
Second, Custom Level progress bar
1. Create a new XML file in the Drawable directory of the Android project as follows:
<?xml version= "1.0" encoding= "Utf-8"?>
<layer-list xmlns:android= "Http://schemas.android.com/apk/res/android" >
<!--background gradient is a gradient, corners defines rounded corners--
<item android:id= "@android: Id/background" >
<shape>
<corners android:radius= "10DP"/>
<solid android:color= "#ffffff"/>
</shape>
</item>
<!--second progress bar color--
<item android:id= "@android: Id/secondaryprogress" >
<clip>
<shape>
<corners android:radius= "10dip"/>
<gradient
Android:angle= "90.0"
Android:centercolor= "#ac6"
android:centery= "0.45"
Android:endcolor= "#6c2"
Android:startcolor= "#e71a"/>
</shape>
</clip>
</item>
<!--progress Bar--
<item android:id= "@android: Id/progress" >
<clip>
<shape>
<corners android:radius= "10dip"/>
<solid android:color= "#F5e5"/>
</shape>
</clip>
</item>
</layer-list>
2. Call
<progressbar
Android:layout_width= "Match_parent"
android:layout_height= "Wrap_content"
Android:progress= "20"
Android:secondaryprogress= "50"
Style= "@android: Style/widget.holo.progressbar.horizontal"
android:progressdrawable= "@drawable/progress_color"
/>
The simplest Android custom progress bar style