我的应用程序中有这个SeekBar
:
<SeekBar
android:id="@+id/volume_seek_bar"
android:layout_width="match_parent"
android:layout_height="40dp"
android:theme="@style/Volume_Seekbar" />
这是样式文件:
<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/toolbar_background</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="ProgressBarStyle">
<item name="colorAccent">@color/colorPrimary</item>
</style>
<style name="Volume_Seekbar">
<item name="colorPrimary">@color/app_blue</item>
<item name="colorPrimaryDark">@color/toolbar_background</item>
<item name="colorAccent">@color/app_blue</item>
</style>
我想使用样式来更改颜色,SeekBar
但它一直从AppTheme
样式中获取颜色定义。知道有什么问题吗?