编辑:
问题 1) 已解决。但我还是无法改变color的ProgressBar。我尝试使用我自己的theme(见下面的代码)。
我希望我ProgressBar的看起来像下图。我已经创建了ProgressBar我的上述ListView使用.I'm ListView,ProgressBar和两个TextViews中RelativeLayout。
我的问题:
1.) 我怎样才能按照下面显示的方式对齐
TextViews上面的内容ProgressBar?
2.) 如何设置ProgressBar自身的颜色和 的背景颜色ProgressBar?

主活动.xml
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/progressBarText"
android:progress="0"
android:max="100"
android:paddingTop="0dp"
android:paddingBottom="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:theme="@style/progressBarTheme"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"/>
样式文件
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="DialogTheme" parent="Theme.AppCompat.Light.Dialog">
<item name="colorAccent">@android:color/holo_green_dark</item>
</style>
<style name="progressBarTheme" parent="@style/Theme.AppCompat">
<item name="colorAccent">@color/myRedColor</item>
</style>
</resources>
桃花长相依
随时随地看视频慕课网APP
相关分类