【问题标题】:Why Status Bar Color Not Changing?为什么状态栏颜色不变?
【发布时间】:2017-07-08 06:33:23
【问题描述】:

我有这个代码:

import React from 'react';
import { View, StatusBar } from 'react-native';

export default class App extends React.Component {
  render() {
    return (
      <View>
         <StatusBar
           backgroundColor="blue"
           barStyle="light-content"
         />
       </View>
    );
  }
}

我在 Android 6 - MiUI 8.5 上的 EXPO 应用程序下运行它。我的问题是,为什么状态栏仍然是白色的。不是蓝色的?什么都没有改变。我只有空白屏幕(因为 MiUI 中的状态栏文本也是白色的)。

【问题讨论】:

标签: react-native


【解决方案1】:

我关闭了 EXPO 应用程序并再次启动它。它有效。我认为问题出在 EXPO 应用程序上。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-03-05
    • 2021-04-19
    • 2019-08-03
    • 1970-01-01
    • 2014-12-17
    • 1970-01-01
    • 2014-08-14
    • 1970-01-01
    相关资源
    最近更新 更多