Skip to content

Commit d2e01c5

Browse files
committed
Review
1 parent cf247aa commit d2e01c5

4 files changed

Lines changed: 8 additions & 13 deletions

File tree

‎packages/rn-tester/js/examples/Experimental/PlatformTest/RNTesterPlatformTestResultView.js‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import {memo, useCallback, useMemo, useState} from 'react';
2626
import {
2727
Button,
2828
FlatList,
29-
I18nManager,
3029
KeyboardAvoidingView,
3130
Modal,
3231
Platform,
@@ -246,14 +245,11 @@ export default function RNTesterPlatformTestResultView(
246245
if (safeAreaInsets == null) {
247246
return null;
248247
}
249-
// Insets are physical edges, but Yoga treats paddingLeft/paddingRight as
250-
// start/end when swapLeftAndRightInRTL is on.
251-
const swap = I18nManager.isRTL && I18nManager.doLeftAndRightSwapInRTL;
252248
return {
253249
paddingTop: safeAreaInsets.top,
254-
paddingRight: swap ? safeAreaInsets.left : safeAreaInsets.right,
250+
paddingRight: safeAreaInsets.right,
255251
paddingBottom: safeAreaInsets.bottom,
256-
paddingLeft: swap ? safeAreaInsets.right : safeAreaInsets.left,
252+
paddingLeft: safeAreaInsets.left,
257253
};
258254
}, [safeAreaInsets]);
259255

‎private/helloworld/App.tsx‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import * as React from 'react';
1111
import {useState} from 'react';
1212
import {
13-
I18nManager,
1413
type SafeAreaInsets,
1514
ScrollView,
1615
StatusBar,
@@ -23,18 +22,15 @@ import {
2322
function App(): React.ReactNode {
2423
const isDarkMode = useColorScheme() === 'dark';
2524
const [insets, setInsets] = useState<SafeAreaInsets | null>(null);
26-
// Insets are physical edges, but Yoga treats paddingLeft/paddingRight as
27-
// start/end when swapLeftAndRightInRTL is on.
28-
const swap = I18nManager.isRTL && I18nManager.doLeftAndRightSwapInRTL;
2925

3026
return (
3127
<View
3228
style={
3329
insets && {
3430
paddingTop: insets.top,
35-
paddingRight: swap ? insets.left : insets.right,
31+
paddingRight: insets.right,
3632
paddingBottom: insets.bottom,
37-
paddingLeft: swap ? insets.right : insets.left,
33+
paddingLeft: insets.left,
3834
}
3935
}
4036
experimental_onSafeAreaInsetsChange={event =>

‎private/helloworld/android/app/src/main/AndroidManifest.xml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
android:icon="@mipmap/ic_launcher"
99
android:roundIcon="@mipmap/ic_launcher_round"
1010
android:allowBackup="false"
11+
android:theme="@style/AppTheme"
1112
android:usesCleartextTraffic="${usesCleartextTraffic}"
12-
android:theme="@style/AppTheme">
13+
android:supportsRtl="false">
1314
<activity
1415
android:name=".MainActivity"
1516
android:label="@string/app_name"

‎private/helloworld/ios/HelloWorld/Info.plist‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
</array>
5050
</dict>
5151
</dict>
52+
<key>RCTSupportsRTL</key>
53+
<false/>
5254
<key>RCTUseAssetCatalog</key>
5355
<true/>
5456
<key>UILaunchStoryboardName</key>

0 commit comments

Comments
 (0)