My problem is that when the language is Arabic then i want to DrawerLayout open with the gravity of RIGHT and when the language will English then to DrawerLayout open with the gravity of Left.......
Asked
Active
Viewed 109 times
0

TANZEEM HUSSAIN
- 1
- 1
-
If you have `android:supportsRtl="true"` in the manifest, it will do that automatically with `android:layout_gravity="start"`. If yours is not, you'll need to provide a [mcve] that demonstrates the issue. – Mike M. Apr 09 '20 at 00:40
1 Answers
0
You can use end
and start
keywords instead of left
and right
, to achieve this
like android:layout_gravity="end"
Also, add this to your manifest > application android:supportsRtl="true"

haliltprkk
- 1,428
- 3
- 14
- 26
-
i also use android:supportsRtl="true" in manifest but not work...... As you say You can use end and start keywords instead of left and right, to achieve this like android:layout_gravity="end" but i want to use it programatically – TANZEEM HUSSAIN Apr 08 '20 at 16:00
-
Hmm, Can you pls check this, I think this can help you https://stackoverflow.com/questions/2900023/change-app-language-programmatically-in-android – haliltprkk Apr 08 '20 at 16:02