Please provide the following:
- SDK Version: 48
- Platforms(Android/iOS/web/all): Android
- Add the appropriate “Tag” based on what Expo library you have a question on: expo-localization
Hi all,
My device is configured with an RTL language. However, running the below code result in strange behavior. Here’s the code I’m running:
import { I18nManager, Text, View } from 'react-native';
import { getLocales } from 'expo-localization';
const { textDirection } = getLocales()[0];
const StartPage = () =>
(<View>
{console.log(I18nManager?.isRTL)}
{console.log(textDirection)}
<Text style={{
marginStart: 50,
paddingStart: 12,
backgroundColor: 'yellow',
}}>marginStart, paddingStart</Text>
</View>)
;
Emulator + console:
As you can see, marginStart works as expected, it starts from the right, but the paddingStart starts from the left. Do you have any explanation for this? Why paddingStart works this way? How can it be fixed?
Thanks,
Oran