1

I want show icon menu navigation drawer from right but now it show from left please help ?

<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:layout_gravity="right"
tools:openDrawer="right">

<android.support.design.widget.NavigationView
    android:id="@+id/nav_view"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:layout_gravity="right"
    android:layoutDirection="rtl"
    android:fitsSystemWindows="true"
    app:headerLayout="@layout/nav_header_main"
    app:menu="@menu/activity_main_drawer"/>

enter image description here

Paebbels
  • 15,573
  • 13
  • 70
  • 139
Hadi Khezrpor
  • 401
  • 5
  • 21

1 Answers1

1

Try using the attribute android:layout_gravity="end" inside the NavigationView element.

dalla92
  • 432
  • 2
  • 8
  • https://stackoverflow.com/questions/61692792/how-can-i-have-one-item-of-menu-rtl-and-another-one-ltr – MMG May 10 '20 at 05:05