Reputation: 319
I have the following situation - when I use rtl text it sticks to the left.
I've seen react git add a couple of issues related to that, and they were closed. maybe I don't know how to apply it?
Upvotes: 5
Views: 11842
Reputation: 1114
I had similar issue with text-input in IOS, I added a condition to styles.
here is my code:
import { I18nManager } from 'react-native'
and add this to your styles
textAlign : I18nManager.isRTL ? 'right' : 'left',
Hope it helps Someone,
Upvotes: 4
Reputation: 119
You need to import this :
import { I18nManager } from 'react-native'
and use this when you want forcing to rtl:
I18nManager.forceRTL(true)
and use textAlign : "right"
OR textAlign : "left"
on textInput as when you want use RTL OR LTR.
Upvotes: 8