/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow * @format */ 'use strict'; const React = require('react'); const ReactNative = require('react-native'); const { Alert, Animated, I18nManager, Image, PanResponder, PixelRatio, ScrollView, StyleSheet, Text, TouchableWithoutFeedback, Switch, View, Button, } = ReactNative; const Platform = require('Platform'); const RNTesterPage = require('./RNTesterPage'); const RNTesterBlock = require('./RNTesterBlock'); type State = { toggleStatus: any, pan: Object, linear: Object, isRTL: boolean, windowWidth: number, }; const SCALE = PixelRatio.get(); const IMAGE_DIMENSION = 100 * SCALE; const IMAGE_SIZE = [IMAGE_DIMENSION, IMAGE_DIMENSION]; const IS_RTL = I18nManager.isRTL; function ListItem(props) { return ( Text Text Text Button ); } function TextAlignmentExample(props) { return ( Left-to-Right language without text alignment. {'\u0645\u0646 \u0627\u0644\u064A\u0645\u064A\u0646 ' + '\u0625\u0644\u0649 \u0627\u0644\u064A\u0633\u0627\u0631 ' + '\u0627\u0644\u0644\u063A\u0629 \u062F\u0648\u0646 ' + '\u0645\u062D\u0627\u0630\u0627\u0629 \u0627\u0644\u0646\u0635'} {'\u05DE\u05D9\u05DE\u05D9\u05DF \u05DC\u05E9\u05DE\u05D0\u05DC ' + '\u05D4\u05E9\u05E4\u05D4 \u05D1\u05DC\u05D9 ' + '\u05D9\u05D9\u05E9\u05D5\u05E8 \u05D8\u05E7\u05E1\u05D8'} ); } function AnimationBlock(props) { return ( ); } type RTLSwitcherComponentState = {| isRTL: boolean, |}; function withRTLState(Component) { return class extends React.Component<*, RTLSwitcherComponentState> { constructor(...args) { super(...args); this.state = { isRTL: IS_RTL, }; } render() { const setRTL = isRTL => this.setState({isRTL: isRTL}); return ; } }; } const RTLToggler = ({isRTL, setRTL}) => { if (Platform.OS === 'android') { return {isRTL ? 'RTL' : 'LTR'}; } const toggleRTL = () => setRTL(!isRTL); return (