Here is the problem, I am using toolbar and I am making it's background color white (or grey, doesn't make difference).
Toolbar code:
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:fitsSystemWindows="true"
android:minHeight="?attr/actionBarSize"
app:theme="@style/AppTheme"
android:background="?attr/colorPrimaryDark">
Style.xml code:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#F5F5F5</item>
<item name="colorPrimaryDark">#000</item>
<item name="colorAccent">#ffe162ff</item>
</style>
So I read from here that in Lollipop "colorPrimaryDark" must change status bar color, but it doesn't work. I need to change it, bcs status bar text by default is white and with white background it became unreadable. So what I am doing wrong or I don't understand something? At the moment I use <item name="android:statusBarColor">#000</item>
to fix my issue, but it is not cool in my opinion.
So in general, I want toolbar with white background color and readable status bar (i.e. or white background and black text, I also read that it is hard to change status bar text color, that means I can only use dark background?? Or black status bar + white default text)
What happens is that when you set a colorPrimaryDark
to a white color (or almost it) the app automatically change the color to black, try to use a darker colorPrimaryDark and it should work without additional code.
And it is not possible to change the text color, sorry about that.