Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the status bar color in Android?

First of all it's not a duplicate as in How to change the background color of android status bar

How do I change the status bar color which should be same as in navigation bar.

I want the status bar color to be same as the navigation bar color

enter image description here

like image 262
codercat Avatar asked Mar 05 '14 08:03

codercat


People also ask

How do I change the color of my status bar?

Step 1: After opening the android studio and creating a new project with an empty activity. Step 2: Navigate to res/values/colors. xml, and add a color that you want to change for the status bar.

How do you change the color of your toolbar on Android?

Just go to res/values/styles.edit the xml file to change the color of action bar.

Can I change the color of my notification bar?

Probably the best option for non-rooted (and also rooted users, if you enjoy simplicity), Material Notification Panel allows you to completely customize the notification panel with colors, transparency, background photos, and icon style – if you have a Nougat phone but want Oreo notification panel icons, for example, ...


1 Answers

Android 5.0 Lollipop introduced Material Design theme which automatically colors the status bar based on the colorPrimaryDark value of the theme.

Note by realdognose: with Material Design library it will be colorPrimaryVariant

This is supported on device pre-lollipop thanks to the library support-v7-appcompat starting from version 21. Blogpost about support appcompat v21 from Chris Banes

enter image description here

Read more about the Material Theme on the official Android Developers website

like image 85
Giorgio Avatar answered Oct 06 '22 05:10

Giorgio