RN中隐藏状态栏的方式很简单,在页面的根布局的顶部添加一个StatusBar即可,设置相关属性如下:

export default class MainPage extends Component {
    render() {
        return(
            <View style={{flex: 1}}>
                <StatusBar backgroundColor="#ff0000"
                           translucent={true}
                           hidden={true}
                           animated={true}/>
                <Text>HelloWord</>
            </View>
        )
    }
}

 

原文链接:https://blog.csdn.net/qq_28484355/article/details/81320019

相关文章:

  • 2021-12-10
  • 2021-12-28
  • 2021-11-23
  • 2021-12-28
  • 2021-11-23
  • 2021-05-31
  • 2021-09-24
  • 2021-11-23
猜你喜欢
  • 2021-04-29
  • 2022-01-21
  • 2022-01-02
  • 2021-12-28
  • 2021-11-30
  • 2022-12-23
相关资源
相似解决方案