Android Arabic text alignment

后端 未结 1 653
無奈伤痛
無奈伤痛 2021-01-15 02:19

I use class from How to support Arabic text in Android? to show Arabic text. In Android 2.1 - 2.3 text located in the left side, so I use android:gravity=\"right\", but in A

相关标签:
1条回答
  • 2021-01-15 02:48

    You can create different versions of the layouts for different API versions.

    As you can read here: http://developer.android.com/guide/topics/resources/providing-resources.html you can have say the normal folder (/res/layout/) with the layout for old devices and then another one for the ones that support it: /res/layout-11/

    The layout inside layout-v11 will only be applied on devices with android 3.0 and over.

    Hope it helps. (UPD: API level changed to 11)

    UPDATE

    On Android 4.2 This is a native feature :)

    http://android-developers.blogspot.com.es/2013/03/native-rtl-support-in-android-42.html

    0 讨论(0)
提交回复
热议问题