React-native textAlign justify
Android does not support text justification. The docs of React Native Text component about the style attribute says:
textAlign enum('auto', 'left', 'right', 'center', 'justify') : Specifies text alignment. The value 'justify' is only supported on iOS and fallbacks to left on Android.
A workaround for this limitation is to use a React Native WebView component. The content of the WebView can be an HTML code with the justified text. Like this:
<View style={{flex: 1}}>
<WebView
source={{ html: "<p style='text-align: justify;'>Justified text here</p>" }}
/>
</View>
** UPDATE **
For the old versions of react-native, the textAlign:'justify'
was not working for android, but now it supports textAlign:'justify'
for android Oreo and above.
textAlign: enum('auto', 'left', 'right', 'center', 'justify')
Specifies text alignment. The value 'justify' is only supported on iOS and Android Oreo (8.0) or above (API level >= 26). For lower android version, it will fall back to left.