Display Arabic text in android textview

后端 未结 1 1112
南笙
南笙 2020-12-17 04:25

I\'m trying to develop android app where I have html files saved in asset folders, these files contain Arabic text like this قُلِ اللَّهُمَّ مَالِكَ الْمُ

相关标签:
1条回答
  • 2020-12-17 04:57

    Use android:textDirection with "anyRtl".

    • From xml: Add this line: android:textDirection="anyRtl" to your TextView tag.

    • From code: textview.setTextDirection(View.TEXT_DIRECTION_ANY_RTL);

    PS: Since API 17+.

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