android center text react native
headline: {
textAlign: 'center', // <-- the magic
fontWeight: 'bold',
fontSize: 18,
marginTop: 0,
width: 200,
backgroundColor: 'yellow',
}
android center text react native
headline: {
textAlign: 'center', // <-- the magic
fontWeight: 'bold',
fontSize: 18,
marginTop: 0,
width: 200,
backgroundColor: 'yellow',
}
vertically center text react native
import React, { Component } from 'react';
import { Platform, StyleSheet, View, Text, } from 'react-native';
export default class App extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.headerText}>Welcome to skptricks.com</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center'
},
headerText: {
fontSize: 20,
textAlign: "center",
margin: 10,
fontWeight: "bold"
},
});
align text center react native
<View style={{flex: 1,textAlign: 'center',alignItems: 'center', textAlignVertical: 'center' }}>
react native text align vertical center
style={{textAlignVertical: 'top'}}
react native text align vertical center
<View style={{justifyContent: 'center'}}>
<Text>Vertically Centered Text</Text>
</View>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us