In my app in setings I use EditTextPreference , and on android API uder 11 edittext field has black background and black text color. How can I chenge EditTextPreferences background color ?
I tried: in theme :
<item name="android:editTextPreferenceStyle">@style/EditTextAppTheme</item>
in style:
<style name="EditTextAppTheme" parent="android:Widget.EditText">
<item name="android:background">@drawable/edit_text_holo_light</item>
<item name="android:textColor">#000000</item>
</style>
If I set style to :
<style name="EditTextPreferences" parent="android:Preference.DeviceDefault.DialogPreference.EditTextPreference">
<item name="android:background">@drawable/edit_text_holo_light</item>
<item name="android:textColor">#FF0000</item>
</style>
And theme to :
<item name="android:editTextPreferenceStyle">@style/EditTextPreferences</item>
I got error:
error: Error retrieving parent for item: No resource found that matches the given name 'android:Preference.DeviceDefault.DialogPreference.EditTextPreference'.
android:alertDialogTheme
did it for me! I just wanted to style the little sub-dialogs that appear when you press e.g.EditTextPreference
. Thanks! – Tesstessa