Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to style DialogPreference with a custom theme?
    text
    copied!<p>In my application I was using Theme.Holo and Theme.Holo.Light without any issues. When Holo theme is used and I click on a DialogPreference/ListPreference, a popped dialog is also themed with Holo. Same for the Holo.Light. But when PreferencesActivity is styled with my custom theme, which is derived from Holo.Light, all dialogs are themed with Holo.Light. I think I am missing somthing in my theme. Could anyone help me? Thanks a lot!</p> <p>Here is my theme code:</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;!-- Generated with http://android-holo-colors.com --&gt; &lt;resources xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;style name="GreenTheme" parent="android:Theme.Holo.Light"&gt; &lt;item name="android:editTextBackground"&gt;@drawable/edit_text_holo_light&lt;/item&gt; &lt;item name="android:autoCompleteTextViewStyle"&gt;@style/AutoCompleteTextViewGreenTheme&lt;/item&gt; &lt;item name="android:listChoiceIndicatorMultiple"&gt;@drawable/btn_check_holo_light&lt;/item&gt; &lt;item name="android:listChoiceIndicatorSingle"&gt;@drawable/btn_radio_holo_light&lt;/item&gt; &lt;item name="android:buttonStyle"&gt;@style/ButtonGreenTheme&lt;/item&gt; &lt;item name="android:imageButtonStyle"&gt;@style/ImageButtonGreenTheme&lt;/item&gt; &lt;item name="android:dropDownSpinnerStyle"&gt;@style/SpinnerGreenTheme&lt;/item&gt; &lt;item name="android:tabWidgetStyle"&gt;@style/TabWidgetGreenTheme&lt;/item&gt; &lt;item name="android:progressBarStyleHorizontal"&gt;@style/ProgressBarGreenTheme&lt;/item&gt; &lt;item name="android:seekBarStyle"&gt;@style/SeekBarGreenTheme&lt;/item&gt; &lt;item name="android:buttonStyleToggle"&gt;@style/ToggleGreenTheme&lt;/item&gt; &lt;item name="android:listChoiceBackgroundIndicator"&gt;@drawable/list_selector_holo_light&lt;/item&gt; &lt;item name="android:activatedBackgroundIndicator"&gt;@drawable/activated_background_holo_light&lt;/item&gt; &lt;item name="android:fastScrollThumbDrawable"&gt;@drawable/fastscroll_thumb_holo&lt;/item&gt; &lt;item name="android:actionBarStyle"&gt;@style/ActionBar.Solid.Greenactionbar&lt;/item&gt; &lt;item name="android:buttonBarButtonStyle"&gt;@style/ButtonBarButtonStyleGreenTheme&lt;/item&gt; &lt;item name="android:preferenceStyle"&gt;@style/TimePickerDialogFragmentGreen&lt;/item&gt; &lt;/style&gt; &lt;style name="TimePickerDialogFragmentGreen" parent="@android:style/Theme.Holo.Light.Dialog"&gt; &lt;item name="android:editTextBackground"&gt;@drawable/edit_text_holo_light&lt;/item&gt; &lt;item name="android:autoCompleteTextViewStyle"&gt;@style/AutoCompleteTextViewGreenTheme&lt;/item&gt; &lt;item name="android:listChoiceIndicatorMultiple"&gt;@drawable/btn_check_holo_light&lt;/item&gt; &lt;item name="android:listChoiceIndicatorSingle"&gt;@drawable/btn_radio_holo_light&lt;/item&gt; &lt;item name="android:buttonStyle"&gt;@style/ButtonGreenTheme&lt;/item&gt; &lt;item name="android:imageButtonStyle"&gt;@style/ImageButtonGreenTheme&lt;/item&gt; &lt;item name="android:dropDownSpinnerStyle"&gt;@style/SpinnerGreenTheme&lt;/item&gt; &lt;item name="android:tabWidgetStyle"&gt;@style/TabWidgetGreenTheme&lt;/item&gt; &lt;item name="android:progressBarStyleHorizontal"&gt;@style/ProgressBarGreenTheme&lt;/item&gt; &lt;item name="android:seekBarStyle"&gt;@style/SeekBarGreenTheme&lt;/item&gt; &lt;item name="android:buttonStyleToggle"&gt;@style/ToggleGreenTheme&lt;/item&gt; &lt;item name="android:listChoiceBackgroundIndicator"&gt;@drawable/list_selector_holo_light&lt;/item&gt; &lt;item name="android:activatedBackgroundIndicator"&gt;@drawable/activated_background_holo_light&lt;/item&gt; &lt;item name="android:fastScrollThumbDrawable"&gt;@drawable/fastscroll_thumb_holo&lt;/item&gt; &lt;item name="android:actionBarStyle"&gt;@style/ActionBar.Solid.Greenactionbar&lt;/item&gt; &lt;item name="android:buttonBarButtonStyle"&gt;@style/ButtonBarButtonStyleGreenTheme&lt;/item&gt; &lt;/style&gt; &lt;/resources&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload