android determine if device is in right to left language/layout

后端 未结 8 1921
予麋鹿
予麋鹿 2020-12-09 07:49

Is there a way to determine if the device is in a right to left language (something like Arabic) as opposed to something that\'s left to right (English)?

Something c

8条回答
  •  天命终不由人
    2020-12-09 08:43

    Yes,use the Bidi.getBaseLevel() function, it will return 0 for left-to-right and 1 for right to left.

    http://developer.android.com/reference/java/text/Bidi.html#getBaseLevel()

提交回复
热议问题