Indeterminate ProgressBar默认是白色的,如果容器的背景也是白色的,这样就根本看不到Progressbar.
用style属性设定反转的颜色.
1 <ProgressBar style="@android:style/Widget.ProgressBar.Inverse"/>
2 <ProgressBar style="@android:style/Widget.ProgressBar.Large.Inverse"/>
3 <ProgressBar style="@android:style/Widget.ProgressBar.Small.Inverse"/>
@drawable/image_for_rotation 就是那张做好的图片
给ProgressBar widget设定android:indeterminateDrawable1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:orientation="vertical" 4 android:layout_width="fill_parent" 5 android:layout_height="fill_parent" 6 android:gravity="center"> 7 <ProgressBar 8 android:indeterminateDrawable="@drawable/my_progress_indeterminate" 9 android:layout_height="100dp" android:layout_width="100dp"/> 10 </LinearLayout>
转载于:https://www.cnblogs.com/wangying222/p/5291721.html
相关资源:IndeterminateProgressBar