I am using appcompat v21.0.3 for my application. I did everything as it is written here: android-developers.blogspot.com/2014/10/appcompat-v21-material-design-for-pre.html
But on Lollipop (and, of course, on older devices) some widgets are not painted with the color of my accent. For example:
Here is my code:
build.gradle
... compile 'com.android.support:appcompat-v7:21.0.+' ...
AndroidManifest.xml
<application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/CET" android:hardwareAccelerated="true" tools:replace="label">
themes.xml
<resources> <style name="CET" parent="Theme.AppCompat.Light.NoActionBar"> <item name="windowActionBar">false</item> <item name="colorPrimary">@color/primary</item> <item name="colorPrimaryDark">@color/primary_dark</item> <item name="colorAccent">@color/accent</item> </style> </resources>
colors.xml
<resources> <!-- App branding color --> <color name="primary">#a32b30</color> <!-- Darker variant for status bar and contextual app bars --> <color name="primary_dark">#000000</color> <!-- Theme UI constrols like checkboxes and text fields --> <color name="accent">#a32b30</color> </resources>
Does anyone have any ideas?
UPDATE: as of June 2015 still not working, but I ended up using https://github.com/afollestad/material-dialogs . Works very well for dialogs, including ListPreferences.
android android-5.0-lollipop android-widget appcompat
Stéphane
source share