/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow */ 'use strict'; const Platform = require('Platform'); var React = require('react'); var createReactClass = require('create-react-class'); var ReactNative = require('react-native'); var { Image, Text, TextInput, View, LayoutAnimation, Button, Picker, } = ReactNative; type TextAlignExampleRTLState = {| isRTL: boolean, |}; class TextAlignRTLExample extends React.Component<*, TextAlignExampleRTLState> { constructor(...args: Array<*>) { super(...args); this.state = { isRTL: false, }; } render() { const {isRTL} = this.state; const toggleRTL = () => this.setState({isRTL: !isRTL}); return ( auto (default) - english LTR {'\u0623\u062D\u0628 \u0627\u0644\u0644\u063A\u0629 ' + '\u0627\u0644\u0639\u0631\u0628\u064A\u0629 auto (default) - arabic RTL'} left left left left left left left left left left left left left left left center center center center center center center center center center center right right right right right right right right right right right right right justify: this text component{"'"}s contents are laid out with "textAlign: justify" and as you can see all of the lines except the last one span the available width of the parent container.