Reputation: 101
I'm building an app that will work both for RTL and for LTR on local direction , i work with a RTL device (HEBREW) and all views are RTL ok. but on another device a bit newer all views that's text is in Hebrew are right to left but in English they are left to right they supposed to be right to left even if they are in English , already tested on 2 newer phones and yeah this problem again.
please help.
Upvotes: 1
Views: 147
Reputation: 118
While working with an app that supports both RTL and LTR, Use values for gravity as START and END
Upvotes: 0
Reputation: 466
You can change gravity in XML:
<TextView android:width="wrap_content"
android:height="wrap_content"
android:text="example"
android:gravity="right"/>
You can also change it in code:
textView.setGravity(Gravity.RIGHT);
Upvotes: 1