How can i make my android app look the same on RTL and LTR languages?

Viewed 105

When operating on a LTR language phone my app looks fine like this:

but when operating on a RTL language phone my app gets either glued to the right like this:

or you can't even see the screen like this:

how can i make my app look exactly as it looks on a LTR phone?

p.s i have already tried the refactor adjust to RTL language and it didnt change anything. thanks

2 Answers

It sounds like you want to essentially disable RTL support in your app. To do this, go to your AndroidManifest.xml and add this attribute to the <application> tag:

<application
    android:supportsRtl="false"
    ...>

Note that this attribute exists by default, but is set to true (so you just need to change the value to false).

In your Xml while specifying margins for your views always use the attribute marginStart and marginEnd instead of marginLeft and marginRight.For more info on this refer this answer here.

Related