在react原生安卓应用程序中,我可以使用backgroundColor设置StatusBar的背景颜色,但字体颜色仍然是白色,我想要更改为深色
发布于 2016-11-07 16:11:13
如果要将文本颜色更改为黑色,可以使用:
<StatusBar
backgroundColor="#fff"
barStyle="dark-content" // Here is where you change the font-color
/>您可以使用浅色或暗色。
尽管React Native页面上说它只适用于IOS,但它实际上也适用于Android。
已在RN为0.36.1的安卓6.0+上试用
发布于 2021-12-05 04:50:16
使用style定义图标和文本颜色,使用backgroundColor定义背景。
<StatusBar style="light" backgroundColor="#000000" />https://stackoverflow.com/questions/40459662
复制相似问题