就2段关键代码:
custom_progress_draw.xml:
circular就是一张转动效果的静态图片,类似:
[img]http://dl.iteye.com/upload/attachment/0083/4584/466a8096-542c-31dd-b9bf-96fca4ba3285.png[/img]
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" >
<ProgressBar
style="@android:style/Widget.ProgressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminateDrawable="@drawable/custom_progress_draw"
android:max="10000" />
</FrameLayout>
custom_progress_draw.xml:
<?xml version="1.0" encoding="utf-8"?>
<animated-rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/circular"
android:pivotX="50%"
android:pivotY="50%" />
circular就是一张转动效果的静态图片,类似:
[img]http://dl.iteye.com/upload/attachment/0083/4584/466a8096-542c-31dd-b9bf-96fca4ba3285.png[/img]