每个材料指南的非自定义可绘制确定圆形ProgressBar

时间:2017-12-31 19:22:48

标签: android

我正在尝试使用原生Android SDK创建此处显示的循环确定进度条:

https://material.io/design/components/progress-indicators.html#linear-progress-indicators

我一直在阅读这里的文档:

https://developer.android.com/reference/android/widget/ProgressBar.html

但我无法弄明白。似乎确定只能与水平进度条一起使用。

我在这里找到了这个stackoverlfow主题 - Android Circular Determinate ProgressBar - 但是它使用了自定义drawable。因为我们可以像这样轻松地创建一个非常圆形的微调器:

 <ProgressBar
      android:id="@+id/determinateBar"
      style="@android:style/Widget.ProgressBar.Normal"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:indeterminate="true"/>

我希望只添加android:progress="1"android:indeterminate="false"来获取我们在上面看到的循环确定微调器,但这不起作用。

0 个答案:

没有答案