File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ import {
10
10
TouchableOpacity ,
11
11
Button ,
12
12
Alert ,
13
+ DevSettings ,
14
+ I18nManager ,
13
15
} from 'react-native' ;
14
16
import { NavigationContainer , useNavigation } from '@react-navigation/native' ;
15
17
import { createStackNavigator } from '@react-navigation/stack' ;
@@ -119,6 +121,16 @@ export function Navigation() {
119
121
color = "orange"
120
122
/>
121
123
) ,
124
+ headerLeft : ( ) => (
125
+ < Button
126
+ title = { I18nManager . getConstants ( ) . isRTL ? 'RTL' : 'LTR' }
127
+ color = "orange"
128
+ onPress = { ( ) => {
129
+ I18nManager . forceRTL ( ! I18nManager . getConstants ( ) . isRTL ) ;
130
+ DevSettings . reload ( ) ;
131
+ } }
132
+ />
133
+ ) ,
122
134
} }
123
135
/>
124
136
{ examples . map ( ( example , index ) => (
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ import {
10
10
TouchableOpacity ,
11
11
Button ,
12
12
Alert ,
13
+ DevSettings ,
14
+ I18nManager ,
13
15
} from 'react-native' ;
14
16
import { NavigationContainer , useNavigation } from '@react-navigation/native' ;
15
17
import { createStackNavigator } from '@react-navigation/stack' ;
@@ -119,6 +121,16 @@ export function Navigation() {
119
121
color = "orange"
120
122
/>
121
123
) ,
124
+ headerLeft : ( ) => (
125
+ < Button
126
+ title = { I18nManager . getConstants ( ) . isRTL ? 'RTL' : 'LTR' }
127
+ color = "orange"
128
+ onPress = { ( ) => {
129
+ I18nManager . forceRTL ( ! I18nManager . getConstants ( ) . isRTL ) ;
130
+ DevSettings . reload ( ) ;
131
+ } }
132
+ />
133
+ ) ,
122
134
} }
123
135
/>
124
136
{ examples . map ( ( example , index ) => (
You can’t perform that action at this time.
0 commit comments