【发布时间】:2019-05-29 11:16:30
【问题描述】:
我正在尝试使用 React Native 的 StatusBar.currentHeight https://facebook.github.io/react-native/docs/statusbar 获取 Android 设备上的状态栏高度。在像素 2 上,该变量是 24,而实际上状态栏高度是 19。有谁知道在所有使用 React Native 的设备上获得正确状态栏高度的方法?
【问题讨论】:
-
在我的例子中,
StatusBar.currentHeight是 49.09090805053711,而实际上是 62,在 Pixel 4 模拟器上。你最终是如何解决这个问题的? -
@Scottw 有这方面的消息吗?您找到解决方案了吗?
标签: android react-native