1
votes

how to make the default language for android app is Arabic not English and make

support RTL is the default? note : i add android:supportsRtl="true" in mainfast but that does not work

2
In what way does it "not work"? Are you getting a specific error message? Does it display LTR instead? Do you get gibberish characters? CJK glyphs? Does the app freeze? - Robert Columbia
it display LTR instead - Enaam Riyadh

2 Answers

2
votes

you need to add android:layoutDirection="rtl" to all of your layouts to make them RTL by default.

Also, you should run Android Studio > Refactor > Add RTL support where possible to make your layouts RTL friendly.

2
votes

enter code here

configuration.setLocale(locale);

not use

configuration.locale = locale;