3

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?

TOP
  • 2,574
  • 5
  • 35
  • 60

2 Answers2

5

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

kamal2305
  • 671
  • 4
  • 11
1

Use RelativeLayout as the parent layout and then add layout_alignParentStart or layout_alignParentEnd attributes for Text / Checkbox views. Please note, this only works from API v17 on.

pepan
  • 678
  • 6
  • 11