Search code examples
androidcheckboxsettingslocalearabic

How to display checkbox on the left when change language of Android app to Arabic?


In Settings of my Android app, I use many of checkboxPreferences. When the locale selected is English, text appears at the Left side and Check box at the right side. Text ------------------Checkbox

When I change locale to Arabic, I want to get this format: Checkbox---------------Text

But it keeps the same as English locale. I don't know what to do. Can someone help me?


Solution

  • To take advantage of RTL layout mirroring, simply make the following changes to your app:

    1. Declare in your app manifest that your app supports RTL mirroring. Add android:supportsRtl="true" to the element in your manifest file.

    2. Change all of your app's "left/right" layout properties to new "start/end" equivalents.

    For more details follow the link