2017-11-22 11 views
1

右からアイコンメニューのナビゲーション用の引き出しが必要ですが、左から表示されます。右から左へアイコンメニューナビゲーションドロワー

<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

+1

あなたは自動的にUIを変更するためにアンドロイドOSによってRTL(右から左)が使用される場合、アラビア語を使用していますか? –

答えて

1

NavigationView要素内に属性android:layout_gravity="end"を使用してみてください。

関連する問題