我正在尝试更改 CheckBoxPreference 的摘要文本颜色。我通过指定主题更改了标题的文本颜色,但它似乎没有注册到摘要部分。这是我的 theme.xml 文件:
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="settings_theme" parent="android:Theme.Light">
<item name="android:textColor">@color/light_gray</item>
</style>
</resources>
我在设置 Activity 的 onCreate 方法中调用它:
setTheme(R.style.settings_theme);
最佳答案
将此添加到主题中的 style.xml:
<item name="android:textColorSecondary">@color/light_gray</item>
关于Android - PreferenceActivity - 更改 CheckBoxPreference 摘要文本的颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15791216/