How to remove statusbar height

I want to remove StatusBar height.

So although I succeeded in trying not to look like hidden, the height of the status bar still remains. I want to get rid of this statusbar height.

  <View style={styles.container}>
        <StatusBar hidden={true} />
...

Use StatusBar.currentHeight but didn’t work.

  constructor(props) {
    super(props);
  StatusBar.currentHeight = 0
}


How do I get rid of StatusBar area?

Hi @taeeh, I think this prop is what you’re looking for :+1:

already wanted to use this prop to remove the height of the status bar but failed. But I found a solution.

import { SafeAreaView } from "react-navigation";

SafeAreaView.setStatusBarHeight(0);
1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.