`
hududumo
  • 浏览: 239121 次
文章分类
社区版块
存档分类
最新评论

Android 几种 PROGRESSBAR的属性(进度条)

 
阅读更多

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="
http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />

//风格为大圆形进度条

<ProgressBar
android:id="@+id/progressBar1"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

//正常圆形进度条

<ProgressBar
android:id="@+id/progressBar2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

//小圆形进度条

<ProgressBar
android:id="@+id/progressBar3"
style="?android:attr/progressBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true" />

//横向进度条为可以添加indeterminate属性,圆形添加则没有效果

<ProgressBar
android:id="@+id/progressBar4"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true" />

//横向进度条的进度状态

<ProgressBar
android:id="@+id/progressBar4"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:max="1000"
android:progress="200"
android:secondaryProgress="500" />

</LinearLayout>

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics