这应该是一种非常容易定制的样式...
我想要一个水平的进度条,它的厚度非常小(或者我可以自定义厚度),并且颜色与应用程序的颜色匹配
如果我愿意
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_below="@id/textLoading"
android:layout_centerHorizontal="true"
android:indeterminate="true"
/>
进度条是水平的,与应用程序的视觉识别相匹配...但是太细了...该人需要一眼才能看到它
如果我愿意
<ProgressBar
android:id="@+id/progressBar"
style="android:Widget.ProgressBar.Horizontal"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_below="@id/textLoading"
android:layout_centerHorizontal="true"
android:indeterminate="true"
/>
进度条的厚度很好,但是颜色是一个愚蠢的黄色,与该Plannet中的任何颜色都不匹配
我如何自定义各个参数?
有很多方法可以满足您的需求:
1-使用XML文件中的android:scaleY="8"
或来自代码