Fel*_*lix 8 android styles android-preferences
我想将ListPreference的标题和线条颜色从蓝色更改为粉红色,以匹配我的操作栏的行.

有任何想法吗?提前致谢!
我一直在浏览Android themes.xml并styles.xml查看类似的内容dialogPreferenceStyle,但尚未弄明白.
今天有同样的问题.旧线程,但我发现了这一点:它完美无缺.
只需修改styles.xml即可
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<!-- Add this -->
<item name="android:dialogTheme">@style/DialogStyle</item>
<item name="android:alertDialogTheme">@style/DialogStyle</item>
</style>
<!-- Customize your color here -->
<style name="DialogStyle" parent="android:Theme.Material.Dialog">
<item name="android:colorAccent">@color/colorAccent</item>
</style>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4242 次 |
| 最近记录: |