Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change statusbar text color to dark on android 4.4

Tags:

android

Almost 2 weeks ago, I was searching How to change the text color of the statusbar to dark color on android 4.4

The default text color is white, like this

Because I have not enough votes, So I can not post pictures. see detail with pictures at here

I'd like to change the topmost text color to dark, How can I do?

At the meaning time, I find a app had do,

download jumei app

I'm so sorry for My poor English, thank you!

like image 452
iihe602 Avatar asked Jan 11 '15 14:01

iihe602


People also ask

How do I change the color of my text status on Android?

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 can I change my status bar style in Android?

To customize it, first pull down the slider bar from the top of the screen. Next, tap on the three vertical dots in the top right corner. Now click on Status bar. You're in.

What is Android Statusbar?

Status bar (or notification bar) is an interface element at the top of the screen on Android devices that displays the notification icons, minimized notifications, battery information, device time, and other system status details.


2 Answers

You can not set the status bar text color by specifying any color explicitly

But you can try below alternative which is Added in API 23,

You can use "android:windowLightStatusBar" attribute in two ways

  • "android:windowLightStatusBar" = true, status bar text color will be compatible (grey) when status bar color is light

  • "android:windowLightStatusBar" = false, status bar text color will be compatible (white) when status bar color is dark

<style name="statusBarStyle" parent="@android:style/Theme.DeviceDefault.Light">
    <item name="android:statusBarColor">@color/status_bar_color</item>
    <item name="android:windowLightStatusBar">false</item>
</style>

You can check above api in below link - https://developer.android.com/reference/android/R.attr.html#windowLightStatusBar

like image 171
Sunita Avatar answered Oct 08 '22 05:10

Sunita


It's not possible to change the color of the status bar in android. The only thing you can set in your app is the status bar's background color (see this thread).

Maybe you can post some more information about your problem (your links don't work).

like image 2
Max Klein Avatar answered Oct 08 '22 05:10

Max Klein