I've been following the new steps for Android L here: http://developer.android.com/preview/material/theme.html I've have been trying to change the colors of the status bar but it doesn't work.
My styles.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="android:style/Theme.Material.Light">
<!-- Main theme colors -->
<!-- your apps branding color (for the app bar) -->
<item name="android:colorPrimaryDark">@color/primary_dark</item>
<item name="android:colorPrimary">@color/primary</item>
<!-- darker variant of colorPrimary (for status bar, contextual app bars) -->
<!-- theme UI controls like checkboxes and text fields -->
<item name="android:colorAccent">@color/accent</item>
</style>
</resources>
My colors.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="primary">#03a9f4</color>
<color name="primary_dark">#0091ea</color>
<color name="accent">#e1f5fe</color>
</resources>
I have the same problem. And I fix this by change sdk to
Hope it can help.
as of oct 2014, It will not be visible in the layout preview but works when viewed inside on the emulator.
I made it work by changing the style name in styles.xml and in AndroidManifest.xml.
I don't have enough rep to elaborate upon @Allavaz's answer, but his solution worked for me. I changed the generated theme name in both styles.xml and AndroidManifest.xml from
AppTheme
to a different name.I'm using Android Studio 0.8.2.