1.先搜索到系统的ProgressBar的样式,其中的drawable是转动的那个圆环,所以,我们要更改progress_medium_white这个文件
<style name="Widget.ProgressBar">
<item name="indeterminateOnly">true</item>
<item name="indeterminateDrawable">@drawable/progress_medium_white</item>
<item name="indeterminateBehavior">repeat</item>
<item name="indeterminateDuration">3500</item>
<item name="minWidth">48dip</item>
<item name="maxWidth">48dip</item>
<item name="minHeight">48dip</item>
<item name="maxHeight">48dip</item>
<item name="mirrorForRtl">false</item>
</style>
2.重新定义progress_medium_white.xml,放到drawable文件夹下(当自己定义了此文件后,会默认加载自己的)将默认的spinner_white_48图片改为自己的mypic
<animated-rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/mypic"
android:pivotX="50%"
android:pivotY="50%"
/>
3.自定义样式:MyProgressBar
<style name="MyProgressBar" parent=<span style="font-family: Arial, Helvetica, sans-serif;">"Widget.ProgressBar"</span><span style="font-family: Arial, Helvetica, sans-serif;">></span>
<item name="indeterminateOnly">true</item>
<item name="indeterminateDrawable">@drawable/progress_medium_white</item>
<item name="indeterminateBehavior">repeat</item>
<item name="indeterminateDuration">3500</item>
<item name="minWidth">48dip</item>
<item name="maxWidth">48dip</item>
<item name="minHeight">48dip</item>
<item name="maxHeight">48dip</item>
<item name="mirrorForRtl">false</item>
</style>
4.为自己的ProgeressBar引用自己定义的MyProgressBar样式