I'm using the AppCompat-v7:21.0.0
support library for Android 5.0 Lollipop in Android Studio. My problem is that the Status Bar Color that can be changed by setting colorPrimaryDark
in the values/styles.xml
file, is showing up as black, in both the xml layout preview and the emulator.
So what's wrong? Am I missing something? Please let me know. Thanks.
EDIT: I'm aware of the fact that changing the status bar color on Pre-Lollipop versions is not possible. My XML Layout Editor Preview and my Emulator are both set to API Level 21 (5.0 Lollipop). But, the status bar still isn't of the color I set it to in colorPrimaryDark
. I tried doing statusBarColor
in styles.xml
but to no avail. It's still black.
ALSO: I saw one of the answers on a similar question where they advised me to put my minSdkVersion
to 21. I tried that, but it didn't work. And I want my app to run on devices with API Level 15 and above.
layout.xml
on the android studio, the status bar won't show up as colored. On the device however, according to what Patrick said on the above comment, it should work just fine. If it doesn't work on the device either, check out the below answer that I marked and see if that solves your problem... :) – Adifyr