react native text vertical align code example

Example 1: android center text react native

headline: {
    textAlign: 'center', // <-- the magic
    fontWeight: 'bold',
    fontSize: 18,
    marginTop: 0,
    width: 200,
    backgroundColor: 'yellow',
  }

Example 2: align text center react native

<View style={{flex: 1,textAlign: 'center',alignItems: 'center', textAlignVertical: 'center' }}>

Example 3: how to align text inside a touchable opacity

<View style={{ flex: 1, flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
   <Icon type="MaterialCommunityIcons" name="barcode" />
   <Text style={{ textAlign: 'center' }}>{urun_data.barkod}</Text>
</View>