1
votes

I have developed an app in English language. When i change my android language to a right-to-left (later rtl) language , my app goes rtl layout but I don't want that. I want my app layout to stay left-to-right (later ltr) whether android language is ltr or rtl. I know there is layoutdirection in a activity attributes but it's not for APIs below 17.

4

4 Answers

1
votes

I'd still say to use this:

Add in styles.xml in your Base App theme style:

<item name="android:layoutDirection">ltr</item>

17+ is legitimate.

1
votes

Just do this in manifest

    android:supportsRtl="false"
0
votes

with support rtl your layout in english is still ltr.

rtl is on only for languages how japanese and so on.

the most devices are already API 17+.

On emulator or device you can change main language, so you can use rtl or rtl layout depend on selected language.

0
votes

Try to put all of your resources (layouts, strings, drawable ... etc) in rtl language folder like layout-ar and remove default layout folder also use values-ar, drawable-ar .... etc only

i think this will force android to read from it.