3种自定义progressbar

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mainLayout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >   
<ProgressBar 
  android:layout_width="wrap_content" 
  android:layout_height="wrap_content"
  android:indeterminate="false" 
  android:indeterminateDrawable="@drawable/dialog_style_xml_color" />
<ProgressBar 
  android:layout_width="wrap_content" 
  android:layout_height="wrap_content"
  android:indeterminate="false" 
  android:indeterminateDrawable="@drawable/dialog_style_xml_icon2" />
<ProgressBar 
    android:id="@+id/loading_process_dialog_progressBar2"
  android:layout_width="200dp" 
  android:layout_height="200dp"
  android:background="@drawable/radar_scan_frame"
  android:indeterminateDrawable="@drawable/dialog_style_xml_icon"
 />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
  <rotate android:drawable="@drawable/radar_scan_range"
   android:fromDegrees="0.0" android:toDegrees="-360.0" android:pivotX="50.0%"
   android:pivotY="50.0%" />
</item>
</layer-list>
dialog_style_xml_icon.xml
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:pivotX="50%" android:pivotY="50%" android:fromDegrees="0"
android:toDegrees="360">
<shape android:shape="ring" android:innerRadiusRatio="3"
  android:thicknessRatio="8" android:useLevel="false">
  <gradient android:type="sweep" android:useLevel="false"
   android:startColor="#FFFFFF" android:centerColor="#FFDC35"
   android:centerY="0.50" android:endColor="#CE0000" />
</shape>
</rotate>
dialog_style_xml_color.xml

素材:

posted on 2014-03-04 16:14  clarenceV1  阅读(379)  评论(0编辑  收藏  举报

导航