I want to write text in (right to left language i.e. Arabic) in a TextView. But I want to make the text writing direction from right to left. gravity:right
will
By using attributes as below in my xml code strangely I got a right to left text with correct punctuation. But this is not a perfect solution for multi language text:
android:textDirection="ltr"
android:gravity="right"
setting ltr corrects punctuation problems like having dot on right side instead of left.
gravity attribute makes text flow from right to left.