androidlayoutflipview

android: flip a layout without flipping the content inside it


I am making an android app, which supports two languages (Arabic and English)
and as you already know that the English script reads from left to right, while Arabic script reads from right to left. This requires me to, if I change the language, to flip the layout without flipping the component to keep it visible and readable as before like images and texts.

Thank you


Solution

  • In this case flipping view is not the right approach, android has built-in support for different languages for example Arabic which starts from Right to Left, so you have to use RTL for showing Arabic properly.

    Check out these links for better understanding:

    1. https://developer.android.com/training/basics/supporting-devices/languages
    2. https://medium.com/@zhangqichuan/rtl-support-in-android-898e11f31561