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

淡淡的烟草味﹌ 2022-08-24 06:15 303阅读 0赞
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:layout_width="fill_parent"
  4. android:layout_height="fill_parent"
  5. android:orientation="vertical" >
  6. <TextView
  7. android:layout_width="fill_parent"
  8. android:layout_height="wrap_content"
  9. android:text="@string/hello" />
  10. //风格为大圆形进度条
  11. <ProgressBar
  12. android:id="@+id/progressBar1"
  13. style="?android:attr/progressBarStyleLarge"
  14. android:layout_width="wrap_content"
  15. android:layout_height="wrap_content" />
  16. //正常圆形进度条
  17. <ProgressBar
  18. android:id="@+id/progressBar2"
  19. android:layout_width="wrap_content"
  20. android:layout_height="wrap_content" />
  21. //小圆形进度条
  22. <ProgressBar
  23. android:id="@+id/progressBar3"
  24. style="?android:attr/progressBarStyleSmall"
  25. android:layout_width="wrap_content"
  26. android:layout_height="wrap_content"
  27. android:indeterminate="true" />
  28. //横向进度条为可以添加indeterminate属性,圆形添加则没有效果
  29. <ProgressBar www.2cto.com
  30. android:id="@+id/progressBar4"
  31. style="?android:attr/progressBarStyleHorizontal"
  32. android:layout_width="wrap_content"
  33. android:layout_height="wrap_content"
  34. android:indeterminate="true" />
  35. //横向进度条的进度状态
  36. <ProgressBar
  37. android:id="@+id/progressBar4"
  38. style="?android:attr/progressBarStyleHorizontal"
  39. android:layout_width="wrap_content"
  40. android:layout_height="wrap_content"
  41. android:max="1000"
  42. android:progress="200"
  43. android:secondaryProgress="500" />
  44. </LinearLayout>

发表评论

表情:
评论列表 (有 0 条评论,303人围观)

还没有评论,来说两句吧...

相关阅读