Q:

State list for PreferenceScreen?

I've added a widget layout to my preference screens showing an arrow icon, to indicate to users that there are more preferences behind a given PreferenceScreen. 
However, I notice when a PreferenceScreen is not enabled it is darkened. Is there a way I could also change the widget layout being used, or make it stateful, so that I could use a faded icon when my PreferenceScreen is disabled? Similar to how a state list drawable can be applied as a button's background?
tl;dr: How can I change the icon displayed when an instance of PreferenceLayout is disabled?

A:

This can be done solely with XML in 3 steps.
First, create a stateful drawable that can change according to whether the widget using it is enabled, disabled, etc. So statelist_example.xml kept in the drawable folder:
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item
    android:drawable="@drawable/expander_ic_minimized"
    android:state_enabled="true" />
<item
    android:drawable="@drawable/expander_ic_minimized_faded"
    android:state_enabled="false" />
</selector>

Then define your own layout to use this drawable in the layouts folder. This will become the "widgetLayout" for the Preference. So layout_example.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+android:id/widget_frame"
android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView
    android:id="@+id/icon"
    android:src="@drawable/statelist_example"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginLeft="6dip"
    android:layout_marginRight="6dip"
    android:layout_gravity="center" />
</LinearLayout>

Third, specify the widgetLayout in every preference to use this layout:
        <Preference
        android:key="preference_example"
        android:title="@string/preference_title"
        android:widgetLayout="@layout/layout_example" />

So basically you have your Preference reference a Layout which references a stateful drawable.
Android Docs on Statelist Drawable.
Android Docs on Preference widgetLayout. 

