My Project Screenshot: My Project
My Target Design: My Target
I have created a (right to left) navigation drawer. It's working fine but when I'm trying to move the icon from the left side to the right side, it's not working.
<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="start">
<include
layout="@layout/app_bar_main"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="250dp"
android:layout_height="match_parent"
android:layout_gravity="end"
android:background="@color/nav"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:itemIconTint="#d2a967"
app:itemTextColor="#d2a967"
app:menu="@menu/activity_main_drawer" />
Attention: My API is 14+
Add to your Activity before setContentView(R.layout.main_activity);:
This is only possible on API 17+
I am not sure if ActionBar provide such feature . But you can do it by just using a menu item . Create a Menu on extreme right:
Then OnmenuItem click Open/Close the Drawer:-
Need to change following in your code.
In
AndroidManifiest.xml
NOTE : This will work from API 16 and above version.
use this open your Navigation drawer right side if your target API is 17+
Try this Create a new Layout like below
than set Custom view to Your navigation view using below code
EDIT