'android app flip layout when I change language [duplicate]

I created an app on android studio using java.
I have a problem that when I change the language From English to Arabic the app flips 180 degrees (as mirror effect) as shown in the images.

I want to stop that from happening, how do I do that??

In English it is like this
enter image description here

And in Arabic this happens

enter image description here



Solution 1:[1]

Have you tried disabling RTL on the app?

AndroidManifest.xml

<manifest ... >
    ...
    <application ...
        android:supportsRtl="false"
        tools:replace="android:supportsRtl">
    </application>
</manifest>

https://developer.android.com/training/basics/supporting-devices/languages#SupportLayoutMirroring

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1