javascript - React Native 状态栏禁用 Android

标签 javascript android react-native

我正在尝试禁用 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/

相关文章:

javascript - 将随机数据从 JSON 文件加载到 HTML 中?

javascript - 如何在vue.js中从数组中获取对象

javascript - Xbox One 设置中的 "Access to content"值是否可通过 Javascript UWP api 使用?

android - PhoneGap handleOpenUrl 和 Android

linux - 在 React 应用程序上激活谷歌分析

javascript - 扩展 jQuery UI 方法

android - 在平板电脑上从 Android 发送短信

android - 错误 : Parsing the package while installing APK

java - React Native : java. util.zip.ZipException : duplicate entry: com/google/android/gms/iid/zzc. 类

javascript - 当组件可以随时卸载时,如何使用 React 管理 useEffect 中的竞争条件风险?