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.
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);