how to Right To Left my menu items in android

232 Views Asked by At

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.

0

There are 0 best solutions below