Answers for "react native android padding style"

1

react native android padding style

import { Platform} from 'react-native';
import { StyleSheet,Text, SafeAreaView } from 'react-native';

<SafeAreaView style={styles.safeView}>
<Text>Random Text</Text>
 </SafeAreaView>

const styles = StyleSheet.create({
     safeView:{
        flex: 1,
        paddingTop: Platform.OS === 'android' ? 25 : 0, //Android
      }
});
Posted by: Guest on February-21-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language