Android偏好类别样式

Pet*_*Sun 6 android styles

我正在尝试更改文本的颜色和首选项类别的背景.我在网上搜索了答案,但似乎没有任何效果.有没有人成功改变了偏好类别属性的颜色?我可以使用自定义布局来更改首选项类别的外观和感觉吗?我还需要一些方向.请帮忙

这是我到目前为止:

<style name="Theme" parent="@style/android:Theme.Holo.Light">
    <item name="android:actionBarStyle">@style/ActionBar</item>
</style>

<style name="ActionBar" parent="@android:style/Widget.Holo.Light.ActionBar.Solid">
    <item name="android:background">@color/ab_grey</item>
</style>

<style name="PrefCatStyle" parent="Theme">
    <item name="android:textColor">@color/text_green</item>
    <item name="android:background">@color/pref_back</item>
</style>
Run Code Online (Sandbox Code Playgroud)

颜色

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="ab_grey">#adadad</color> <!--  #adadad--> 
    <color name="text_green">#000000</color>
    <color name="pref_back">#FFFFFF</color>
</resources>
Run Code Online (Sandbox Code Playgroud)

我的偏好布局的一部分

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
    <PreferenceCategory 
        android:title="Settings"
        android:key="settings_category"
        style="@style/PrefCatStyle">
Run Code Online (Sandbox Code Playgroud)

而我的部分Manifest

    <application
        android:allowBackup="true"
        android:icon="@drawable/icon"
        android:label="@string/app_name"
        android:theme="@style/Theme" > 
...
        <activity
            android:name=".SettingsPrefActivity"
            android:parentActivityName=".MainActivity"
            android:theme="@style/emTextTheme">
Run Code Online (Sandbox Code Playgroud)

谢谢

Kel*_*iya 5

是.你可以使用自定义布局.看看这个问题的答案.自定义首选项类别标题