Ich muss Navigationsmenü Elemente auf der rechten Seite ausrichten. Ich lese viele Artikel und Fragen und Antworten, aber ich konnte nicht finden, was in meinem Projekt falsch ist. Das ist mein xml:Android von rechts nach links NavigationDrawler Menüpunkte sind nicht RTL
<?xml version="1.0" encoding="utf-8"?>
<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"
tools:openDrawer="right">
<include
layout="@layout/content_activity_home"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<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:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_activity_home"
app:menu="@menu/activity_home_drawer" />
Dies ist activity_home_drawer.xml:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<group android:checkableBehavior="single">
<item
android:id="@+id/menu_account"
android:icon="@drawable/ic_profile"
android:title="حساب کاربری" />
<item
android:id="@+id/menu_logout"
android:icon="@drawable/ic_sign_out"
android:title="خروج از حساب" />
</group>
ich Schublade sich von der Öffnung nach rechts machen können, aber Elemente von NavigationView noch bleibe von links nach rechts. Sie können das Ergebnis hier sehen:
Wie Sie Menüpunkte sind nicht von rechts nach links. Wie man sie rtl macht?
Ich füge diesen Code in meine app, aber ich diese Störung erhalte: „Keine Schublade Ansicht mit der Schwerkraft LEFT gefunden“ –
@ Navid_pdp11 mir Ihren Code senden, es zu beheben – Fartab
ich Richtung RTL zu meiner Schublade hinzufügen und offen von rechts jetzt :) –