
如您所见,上图中的进度条中间有蓝色条,这是进度指示器&在此进度指示器周围有一个黑框。在我的应用程序中,我只想要这个进度条作为蓝条进度指示器,而不是黑框。带有样式Widget.ProgressBar.Horizontal的进度条只显示进度指示器,但它不像进度条样式的Widget.Holo.Light.ProgressBar.Horizontalrizontal那么细。如下图所示。我已经查看了进度条的参考文档,但没有找到任何东西。(http://developer.android.com/reference/android/widget/ProgressBar.html)那么有没有什么xml属性会消失或隐藏周围的黑盒呢?

发布于 2015-12-03 19:14:52
使用以下代码:
<LinearLayout
android:orientation="horizontal"
<!-- SPECIFY HERE YOUR BACKGROUND, LENGTH AND WIDTH -->
... >
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@android:style/Widget.ProgressBar.Small"
android:layout_marginRight="5dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/loading" />
</LinearLayout>https://stackoverflow.com/questions/34064412
复制相似问题