-1

I am working on localization in android.Can anyone suggest what is the best way to deal with RTL screens for Arabic language. i want design to set alignment if the user is selecting Arabic in languages

Syed Danish Haider
  • 1,334
  • 11
  • 15
  • what research have you done already? I'm sure someone else on earth must have had the same question. – Zun Apr 30 '18 at 07:26
  • There are plenty of articles you can find on google. https://android.jlelse.eu/rtl-support-on-android-here-is-all-you-need-know-e13f2df512e2 – Raj Suvariya Apr 30 '18 at 07:27
  • Possible duplicate of https://stackoverflow.com/questions/18996183/identifying-rtl-language-in-android – Nikhil Lotke Apr 30 '18 at 07:27

2 Answers2

1

OK to support RTL and be Like LTR without error in design

1- when You Use Margin and Padding and Gravity Use Start Or End .. not Using Right Or Left

android:layout_marginEnd="5dp"

Not

android:layout_marginLeft="5dp"

2- store All String In String.Xml

                android:hint="@string/weight"

Not

                android:hint="weight"

3- it`s Prefer to use minSdkVersion to be 17

4 - if you have Image What Direction Change "Like Back Button " Use Vector Image With Monitor RTL

enter image description here

Elsunhoty
  • 1,609
  • 14
  • 27
0

Try this

 <application
        android:supportsRtl="true">
// YOUR ACTIVITY

</application>
Siddharth Patel
  • 205
  • 1
  • 13