Joyal
Joyal

Reputation: 412

How to change the PreferenceActivity xml style/Theme

Change the background color, divider color etc.... Settings.xml

In manifest,
        <activity
        android:name="package.Settings"
        android:screenOrientation="portrait" 
        android:theme="@style/settingslist_row" >
    </activity>

 @Style
 <style name="settingslist_row">
    <item name="android:divider">#FF0000</item>
    <item name="android:textColorSecondary">#87CEEB</item>
    <item name="android:dividerHeight">2dp</item>       
</style>

My problem is divider color is not working

 <item name="android:divider">#FF0000</item> 

Upvotes: 0

Views: 1285

Answers (1)

vinay
vinay

Reputation: 90

Its my app layout

<PreferenceCategory android:title="Wallpaper Settings" >

    <PreferenceScreen
        android:key="aliveWallpaperList"
        android:layout="@layout/custom_preferece_layout"
        android:summary="Select your live wallpaper"
        android:title="Video Menu" >
    </PreferenceScreen>

    <Preference
        android:key="download_all_videos_button"
        android:layout="@layout/custom_preferece_layout"
        android:summary="Download all videos in one step"
        android:title="Download all" />

    <!--<CheckBoxPreference
        android:defaultValue="false"
        android:key="RapidCheck"
        android:layout="@layout/custom_preferece_layout"
        android:summary="Turns off server-check.Great once all videos are downloaded"
        android:title="Rapid Video Menu" />

    --><PreferenceScreen
        android:layout="@layout/custom_preferece_layout"
        android:summary="If you have a promo code, enter it here"
        android:title="Promo Code" >

        <intent
            android:targetClass="com.alivewallpaper.free.promocode.PromoCodeVerificationActivity"
            android:targetPackage="com.alivewallpaper.free" />
    </PreferenceScreen>

    <PreferenceScreen
        android:key="addPreference"
        android:layout="@layout/custom_preferece_layout"
        android:summary="Remove ads and get bonus videos and features"
        android:title="Remove Advertising" >
    </PreferenceScreen>
    <PreferenceScreen
        android:key="License"
        android:layout="@layout/custom_preferece_layout"
        android:summary="Terms of use"
        android:title="License " >
    </PreferenceScreen><!--
    <PreferenceScreen
        android:key="freezeWallpaper"
        android:layout="@layout/custom_preferece_layout"
        android:summary="Freeze the video wallpaper"
        android:title="Freeze" >
    </PreferenceScreen>
--></PreferenceCategory>

Upvotes: 1

Related Questions