React-native: The StatusBar barStyle in android5.1 is invalid

Created on 15 Nov 2017  路  7Comments  路  Source: facebook/react-native

Is this a bug report?

yes

Have you read the Contributing Guidelines?

yes

Environment

Environment:
OS: macOS Sierra 10.12.6
Node: 8.4.0
Yarn: 1.0.0
npm: 5.3.0
Watchman: 4.9.0
Xcode: Xcode 9.0.1 Build version 9A1004
Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.50.3 => 0.50.3

Steps to Reproduce

demo1:

<StatusBar barStyle="dark-content" />

demo2:

<StatusBar barStyle="light-content" />

Expected Behavior

I want demo1 status bar text color to white, demo2 status bar text color is black, but it is invalid in android5.1, the status bar text color is always white.android6.0 is ok. I do not know what to do.

Actual Behavior

is android5.1.

I change barStyle and the color of the status bar is always white.

demo:

demo1
demo2

Reproducible Demo

Need android5.1, no demo

Help Wanted Android For Stack Overflow Locked

All 7 comments

I have the same problem,have you resolved it ?

@Mrshutao I have not resolved,Had to change the statusbar translucent

sb
override StatusBarModule#setStyle in native

Maybe it's related to https://github.com/facebook/react-native/issues/16432 because it's not working:

<StatusBar translucent={false} />

Yeah nothing is happening when I set translucent to true or false

This issue looks like a question that would be best asked on StackOverflow.

StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.

Will close this as this is really a question that should be asked on StackOverflow.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TrakBit picture TrakBit  路  3Comments

aniss picture aniss  路  3Comments

phongyewtong picture phongyewtong  路  3Comments

axelg12 picture axelg12  路  3Comments

anchetaWern picture anchetaWern  路  3Comments