0
我有这样的代码:为什么状态栏颜色不变?
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 EXPO应用程序运行它 - MIUI 8.5。我的问题是,为什么状态栏仍然是白色的。不是蓝色?没有什么改变。我只有空白的白色屏幕(因为MiUI中的状态栏文本也是白色的)。
你可以尝试使用“#00F”而不是“蓝色”。 –
@SagarKhatri'backgroundColor =“#FFB515”'也没有改变任何东西,兄弟 –
https://stackoverflow.com/questions/43917663/statusbar-color-in-react-native/43920029#43920029 –