<ProgressBar
android:id="@+id/progressBar1"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"/>
引用android系统自定义的属性:
style="?android:attr/progressBarStyleLarge"尝试<pre code_snippet_id="181972" snippet_file_name="blog_20140210_4_2924579" name="code" class="html"> <!-- Default ProgressBar style. This is a medium circular progress bar. -->
<attr name="progressBarStyle" format="reference" />
<!-- Horizontal ProgressBar style. This is a horizontal progress bar. -->
<attr name="progressBarStyleHorizontal" format="reference" />
<!-- Small ProgressBar style. This is a small circular progress bar. -->
<attr name="progressBarStyleSmall" format="reference" />
<!-- Small ProgressBar in title style. This is a small circular progress bar that will be placed in title bars. -->
<attr name="progressBarStyleSmallTitle" format="reference" />
<!-- Large ProgressBar style. This is a large circular progress bar. -->
<attr name="progressBarStyleLarge" format="reference" />
<!-- Inverse ProgressBar style. This is a medium circular progress bar. -->
<attr name="progressBarStyleInverse" format="reference" />
<!-- Small inverse ProgressBar style. This is a small circular progress bar. -->
<attr name="progressBarStyleSmallInverse" format="reference" />
<!-- Large inverse ProgressBar style. This is a large circular progress bar. -->
<attr name="progressBarStyleLargeInverse" format="reference" />
本文详细介绍了如何在Android应用中使用系统提供的预定义样式创建进度条,包括大型、水平、小型等不同风格的进度条实现方法。
2万+

被折叠的 条评论
为什么被折叠?



