I\'m having a hard time trying to style a ListPreference.
I\'ve applied a main theme which declares a preferenceTheme and both of them link to a dialogTheme (and alertD
Also for radio buttons color add <item name="colorAccent">#000000</item>
to your style.
Be careful, it's not android:colorAccent
but colorAccent
You did everything right, except one thing: do not use the android
prefix when overriding textColorAlertDialogListItem
because this is not the framework version of AlertDialog
.
This statement is generally true for almost all attributes that belong to the support widgets / views. The reason is pretty straightforward: not all attributes are available on the older platforms. Such example is android:colorControlActivated
which was introduced in API 21. The AppCompat lib declares its own colorControlActivated
so it's available on older API levels, too. In this case the developer should not use the android
prefix when defining the style in the theme as that would point to the platform version of the attribute instead of the AppCompat one.
TL;DR: Do not use the android
prefix for support widgets unless you have to (i.e. you get compilation error).
P.S.: I have created a fix / extension to the support preferences-v7 lib's annoying things that you might want to check out.