gpt4 book ai didi

java - Android进度条 只显示进度条,没有背景矩形框

转载 作者:太空宇宙 更新时间:2023-11-04 13:09:59 24 4
gpt4 key购买 nike

enter image description here

正如您所看到的,上图中的进度条中间有蓝色条,这是进度指示器,在该进度指示器周围有一个黑框。在我的应用程序中,我希望这个进度条仅作为蓝色条进度指示器,而没有相应的黑框。 Widget.ProgressBar.Horizo​​ntal 样式的进度条仅显示进度指示器,但不像 Widget.Holo.Light.ProgressBar.Horizo​​ntalrizontal 样式的进度条那样细。我想要它如下图所示。我已经浏览了进度条的引用文档,但没有找到任何内容。 (http://developer.android.com/reference/android/widget/ProgressBar.html) 那么是否有任何 xml 属性可以消失或隐藏周围的黑框呢? enter image description here

最佳答案

使用此代码:

<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>

关于java - Android进度条 只显示进度条,没有背景矩形框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34064412/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com