-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] Hidden <StatusBar> reappears after screen lock #5991
Comments
Hey marcshilling, thanks for reporting this issue! React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.
|
Thanks for reporting this I'll look into it :) |
Summary:I changed the technique used to hide the status bar and now it works properly. Also changed the way flags are set on the decorView to make sure it doesn't cause issues with other flags already set and fix deprecated Promise.reject **Test plan** Test using the UIExplorer StatusBar example, change the `hidden` prop value and go in and out of the app making sure the status bar has the right visibility. Fixes facebook#5991 Closes facebook#6051 Differential Revision: D2960060 Pulled By: nicklockwood fb-gh-sync-id: ee1c541896f5771d27cfd3ff18537edb6c017284 shipit-source-id: ee1c541896f5771d27cfd3ff18537edb6c017284
@janicduplessis I just tried this cf3bd9f on branch class AwesomeProject extends Component {
render() {
return (
<View style={styles.container}>
<StatusBar
hidden
/>
<TextInput/>
</View>
);
}
} Tested on Android 5.
There seems to have an issue with focus on native components, maybe your fix should fixed it ? #6503 & http://stackoverflow.com/questions/36061617/reactnative-status-bar-disable-android |
@charpeni is that code valid? You aren't passing anything to |
@marcshilling It's a valid code, we can omit the value of the prop when it is explicitly |
Why this issue is closed when problem still exist? |
@charpeni Have you rebuilt the native code? I just tested the steps you described using 0.22.0-rc4 from npm in one of my apps and it worked. |
I have same issue, on every event soft keyboard open back button pressed etc. status bar showed up |
Are you on 0.22? |
0.21 |
Ok, this is normal the issue was fixed only in 0.22. Can you try with 0.22.0-rc4? |
how to get that? |
npm install --save react-native@0.22.0-rc4 |
is there any chance that can break my app? Thanks btw |
0.22.0 will be released this monday so the rc build is pretty stable at this point. |
Thanks a lot man. Respect! |
@janicduplessis Yes, I made a new application with From Did it work for you @TeodorKolev ? |
Can you try 0.22.0-rc4 from npm? I think cloning the branch won't work properly unless you change your build.gradle to compile react-native from node_modules instead of using the version from maven (which is still 0.21 since 0.22.0 is using a prebuilt version distributed by npm instead of maven) You can check http://facebook.github.io/react-native/docs/android-building-from-source.html#content to build it from source properly. |
I can't retry with 0.22.0-rc4 from npm right now because I have this strange error #6446. I think you're totally right about the prebuilt version distributed by npm, I was blinded by Actually, if you say it works I totally believe in your work. Nice job by the way! : |
I'm trying out the new cross-platform StatusBar component. One thing I noticed is that if I lock my Android phone screen on a view with
<StatusBar hidden={true} />
, the status bar is visible again upon unlocking the phone.The text was updated successfully, but these errors were encountered: