Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

statusbar height react native

//Import StatusBar from React-native, not expo 
//unless you will import it as something else
import {
  StyleSheet,
  Text,
  View,
  Dimensions,
  StatusBar,
} from "react-native";

//You can display the height of the device StatusBar on your react-native app:
export default function App() {
  return (
    <View>
        <Text>
          {StatusBar.currentHeight}
        </Text>
    </View>
  );
}

Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #statusbar #height #react #native
ADD COMMENT
Topic
Name
6+9 =