0

I want to make an RTL menu. I have read this page: Right to left menu items Android and http://developer.android.com/reference/android/util/LayoutDirection.html#LTR but they didn't help me. I have added android:supportsRtl="true" to the manifest file. and here is the xml code:

    <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
        android:gravity="end"
        android:layoutDirection="rtl"
        android:layout_gravity="end">
    <item android:title="تنظیمات">
    <item android:title="درباره">
    ...

but it is still ltr. I have also tried:

android:gravity="right"
android:layout_gravity="right"

but it doesn't work either.

TIA.

Vahe Gharibyan
  • 5,277
  • 4
  • 36
  • 47
Mohammad
  • 87
  • 1
  • 9
  • It's unclear from your question what exactly you're trying to achieve, and what the exact problem is. "it doesn't work" is unhelpful. – Ryan M Jan 13 '20 at 20:49
  • My menu items are written left to right. And I want them to be right to left. This is what I want to do. But the related links didn't help me. – Mohammad Jan 14 '20 at 08:07

0 Answers0