【问题标题】:View not coming full screen in Android - React Native在 Android 中查看未全屏显示 - React Native
【发布时间】:2021-01-28 18:33:07
【问题描述】:

我正在尝试将 ImageBackground 显示为全屏,为此,我已经给出了它的父级和 flex:1,以便它将覆盖整个屏幕。它适用于 iOS,但不适用于 Android。我没有使用 SafeAreaView。

这就是我想要实现的目标。

这就是我得到的

组件的要点可以在这里找到https://gist.github.com/praveen-wal/79c495e58f54d5b8b7ace5f93d3bbff9

“反应原生”:“0.63.3”

【问题讨论】:

    标签: react-native react-navigation


    【解决方案1】:

    使状态栏半透明。它将使应用程序在 android 的状态栏下绘制。然后你可以将 backgroundColor 设置为透明。

    链接: https://reactnative.dev/docs/statusbar#translucent https://reactnative.dev/docs/statusbar#backgroundcolor

    <StatusBar translucent backgroundColor="transparent" />
    

    【讨论】:

      猜你喜欢
      • 2021-12-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-13
      • 2022-11-10
      • 1970-01-01
      相关资源
      最近更新 更多