【问题标题】:How to make the status bar translucent when using react-navigation on Android?在Android上使用react-navigation时如何使状态栏半透明?
【发布时间】:2017-06-12 09:38:55
【问题描述】:

我正在使用最新的 react-native(0.45.1) 和 react-navigation(1.0.0-beta.11)。 因为使用react-navigation,我无法使用ReactNative.StatusBar,所以不知道如何让状态栏变成半透明。 可能在 Android 和 iOS 上都有效,THX!

【问题讨论】:

  • 看起来像open issue,在如何最好地处理这个问题上有不同的方法。也许看看 Github cmets,看看有没有适合你的建议。
  • THX,我已经提交了一个问题。

标签: android react-native react-navigation


【解决方案1】:
<StatusBar
   translucent
   backgroundColor="#5E8D48"
   barStyle="light-content"
/>

【讨论】:

    猜你喜欢
    • 2022-10-14
    • 2015-04-07
    • 1970-01-01
    • 2017-07-16
    • 2016-08-18
    • 2017-07-07
    • 1970-01-01
    • 1970-01-01
    • 2016-10-03
    相关资源
    最近更新 更多