I'm using CheckboxPreference in a PreferenceActivity and an AppCompat theme from the v21 support library. As you already know, with this latest library widgets like checkboxes, editTexts, radio buttons etc are tinted with the secondary color defined in the theme. In the preference screen, text is in the right color as specifified by my theme, but checkboxes and edittext are not. It seems that when the CheckboxPreference instance creates the widget, it doesn't apply my theme to it.
Radio buttons in a normal layout, tinted:
Checkbox from the CheckboxPreference, not tinted:
I'm using as the parent theme Theme.AppCompat.Light.NoActionBar
. This happens to every subclass of Preference with a widget, like EditTextPreference to say one, where the EditText has a black bottom line, instead of a tinted line. How can I apply the tint to the widgets shown by the Preference subclasses?
UPDATE: tinting is not applied because PreferenceActivity extends the framework Activity. In the working case, I'm using an ActionBarActivity from the support library. Now the question is: how come?
ActionBarActivity
in my Preferences Activity and the tint work's on Checkbox. But inside anListPreference
the Checkbox is not tinted, only after clicking... – Hiramhirasuna