Skip to content

I want to hide the status bar with a modal overlay. #15443

Closed
@chucky6413

Description

@chucky6413

Is this a bug report?

no

Have you read the Contributing Guidelines?

yes

Environment

  1. react-native -v: 0.46.4
  2. node -v: 8.1.4
  3. npm -v:5.0.3
  4. yarn --version: 0.27.5

Then, specify:

  • Target Platform:Android
  • Development Operating System: macOS
  • Build tools: jdk, android sdk

Steps to Reproduce

(Write your steps here:)

<View style={{flex:1}}>
  <View style={{flex:1}}>
    <StatusBar
      backgroundColor={backgroundColor}
      barStyle={barColor === 'light' ? 'light-content' : 'dark-content' }
     />
  </View>
  <Modal
        visible={ this.state.modalVisible }
        transparent={true}
        onRequestClose={() => { this.setModalVisible(false) }}
        >
       <View style={{flex:1}}>
       </View>     
  </Modal>
</View>
  1. I want to hide the status bar with a modal overlay.
    But as shown in the screenshot below, Modal's overlay does not hide the StatusBar. I want to do it without using the navigator. Why is it not covered? Please help me.

(Write what happened. Add screenshots!)
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions