Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { StatusBar } from 'expo-status-bar';
- import { Dimensions, useWindowDimensions, StyleSheet, Text, View, TouchableWithoutFeedback, TouchableOpacity, TouchableHighlight, Alert, Image, SafeAreaView, Button } from 'react-native';
- import { useDeviceOrientation } from '@react-native-community/hooks';
- export default function App() {
- const orientation = useDeviceOrientation();
- return (
- <SafeAreaView style={styles.container}>
- <View
- style = {{
- backgroundColor: 'dodgerblue',
- width: '100%',
- height: orientation === 'landscape' ? "100%" : "30%",
- }}
- ></View>
- <StatusBar style="auto" />
- </SafeAreaView>
- );
- }
- const containerStyle = {backgroundColor: "orange"};
- const styles = StyleSheet.create({
- container: {
- flex: 1,
- backgroundColor: 'orange'
- },
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement