KAYZORK
KAYZORK

Reputation: 393

React native hide StatusBar completely

I want to hide StatusBar completely and not just do that:

<StatusBar hidden/>

Because this just hide the text and not the big rectangle (in white on the top):
How to hide completely the StatusBar? Thanks. enter image description here

Upvotes: 2

Views: 2838

Answers (3)

Kalpesh A. Nikam
Kalpesh A. Nikam

Reputation: 323

Might your app.js or Appnavigation all screen in safeArea like this :

<SafeAreaView style={{ flex: 1 }}>
      <AppNavigator/>
</SafeAreaView>

In this code my all screen under SafeArea which enforce some white black screen.

thanks

Upvotes: 0

Tsolmonx
Tsolmonx

Reputation: 11

If any one wondering about this. First: Then: you should not use SafeAreaView on the screen

Upvotes: 1

Brendan5320
Brendan5320

Reputation: 64

Are you sure a SafeArea or some other layout style is not pushing your body off the top of the screen? <StatusBar hidden /> should remove the bar completely.

Upvotes: 1

Related Questions