how to write text right to left (Arabic Text)in An

2019-01-19 11:41发布

问题:

I used Arabic text so, I want to write text from right to left so how i can write right to left text in android ?

Regards, Girish

回答1:

Try with Bidi



回答2:

  1. Declare in your app manifest that your app supports RTL mirroring: add android:supportsRtl="true" to the element in your manifest file.
  2. Change all of your app's "left/right" layout properties to new "start/end" equivalents.

Native RTL support in Android 4.2



回答3:

It looks like this is only possible starting with jelly bean



回答4:

use this

android:textDirection="rtl"

android:gravity="right"