fuselibs icon indicating copy to clipboard operation
fuselibs copied to clipboard

Android - Text - RTL - TextAlignment

Open AndrewEQ opened this issue 3 years ago • 2 comments

<Text> with RTL text content (such as Arabic & Hebrew) when it has multiple lines and text-wrapping on, does not align right on Android (tested on 9 & 10).

AndrewEQ avatar Mar 25 '21 22:03 AndrewEQ

Through my testing, I noticed that with RTL content, if you set the Alignment="Left", visually on the device, it aligns to the right and visa versa for Android but not for iOS.

AndrewEQ avatar Mar 26 '21 12:03 AndrewEQ

So I had a look at how Apple is doing RTL in general, it seems that if text is aligned Left, then for RTL its aligned Right automatically and visa versa:

Screenshot 2021-03-26 at 14 57 29

In my testing mentioned above, Android is currently doing the above but iOS isn't, so currently:

LTR

  • iOS: if I set TextAlignment="Left", the text is displayed on the left
  • iOS: if I set TextAlignment="Right", the text is displayed on the right
  • Android: if I set TextAlignment="Left", the text is displayed on the left
  • Android: if I set TextAlignment="Right", the text is displayed on the right

RTL

  • iOS: if I set TextAlignment="Left", the text is displayed on the left
  • iOS: if I set TextAlignment="Right", the text is displayed on the right
  • Android: if I set TextAlignment="Left", the text is displayed on the right
  • Android: if I set TextAlignment="Right", the text is displayed on the left

I believe RTL TextAlignment for iOS needs to match how fuse currently does RTL for Android.

What do you guys think? (@ichan-mb @mortend)

Ref: https://developer.apple.com/videos/play/wwdc2020/10219

AndrewEQ avatar Mar 26 '21 13:03 AndrewEQ