我正在尝试禁用 Android 中的状态栏。我使用的命令有效,但在任何事件(如重新加载、软键盘显示等)中 - 状态栏都会显示。怎么让它永远不显示?我使用的代码:
render() {
return (
<View style={{flex: 1}}>
<StatusBar hidden={true} />
最佳答案
这似乎与 this issue 有关。 (修复应该在 0.22 内完成)
[Android] Hidden reappears after screen lock #5991
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 , the status bar is visible again upon unlocking the phone.
我可能认为对 native 组件的关注也会导致此错误。
关于javascript - React Native 状态栏禁用 Android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36061617/