I\'m trying to develop android app where I have html files saved in asset folders, these files contain Arabic text like this قُلِ اللَّهُمَّ مَالِكَ الْمُ
html
قُلِ اللَّهُمَّ مَالِكَ الْمُ
Use android:textDirection with "anyRtl".
From xml: Add this line: android:textDirection="anyRtl" to your TextView tag.
android:textDirection="anyRtl"
TextView
From code: textview.setTextDirection(View.TEXT_DIRECTION_ANY_RTL);
textview.setTextDirection(View.TEXT_DIRECTION_ANY_RTL);
PS: Since API 17+.