Damn Vegetables
Damn Vegetables

Reputation: 12454

Not change the colour of status bar to colorPrimary

Can I prevent the colour of the status bar becoming colorPrimary? I mean, I do not want to change the status bar colour, and leave it as it is (system default). I have searched Google for this, and the answer was hiding the status bar. But I do not want to hide it.

I also do not want to change the primary colour to that of the default colour of the status bar. I need the primary colour as it is for other things. I just do not want it to be applied to the status bar.

I know that was the default behaviour before Lollipop. Is this still possible after Lollipop?

Upvotes: 3

Views: 2155

Answers (2)

Gokul Nath KP
Gokul Nath KP

Reputation: 15553

In your application theme, set status bar color as below:

<item name="statusBarColor">"YOUR_COLOUR_CODE"</item>

Upvotes: 1

toffor
toffor

Reputation: 1299

This should work

 <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:statusBarColor">#000000</item>
 </style>

Upvotes: 4

Related Questions