How to change PreferenceActivity theme?
<p>I'm trying to change the theme for the PreferenceActivity in my app and I just can't get it to be working.</p>

<p>So, this is the xml:</p>

<pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" &gt;

        &lt;SwitchPreference android:title="Auto Clear" android:key="autoclear" android:summary="Clear the command line when the code is being executed." android:defaultValue="false"/&gt;
        &lt;ListPreference android:title="Choose a theme" android:negativeButtonText="" android:dialogTitle="" android:key="theme" android:entries="@array/themesList" android:entryValues="@array/themesList" android:defaultValue="Default" /&gt;

&lt;/PreferenceScreen&gt;
</code></pre>

<p>And this is the PreferenceActivity:</p>

<pre><code>    @Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);

    this.setTheme(R.style.AppTheme);

    addPreferencesFromResource(R.xml.preferences);

}
</code></pre>

<p>And the result is:</p>

<p><img src="http://i.stack.imgur.com/NpdMo.png" alt="Result"></p>
