Navigation Drawer is very useful to create menu in app. In this post i explain you how to create a navigation drawer with toggle icon animation using material design in android application.

Navigation Drawer with togel arrow android

In this post we are not going to create a navigation drawer i simply download navigation drawer from google developer website and update it into material design navigation drawer.


Step 1. Create new project in Android Studio / Eclipse.

Step 2. We need to add appcompat-v7 library to make thing work. In android studio open build.gradle and add dependency of this library as shown below.

Step 3.  Now open your style.xml file inside folder res ⇒ values ⇒ styles.xml. Here we define some property in our theme which are default if your creating app with material design.

Above i also define color to my spin arrow or toggle arrow which i used in  navigation drawer.

Step 4.  Now create two new XML file one is for toolbar (We create custom toolbar and call it inside activity_main.xml ) and second (drawer_list_item.xml) is load menu list in navigation drawer.

Step 5. Open your activity_main.xml and add following code

 Step 6. Now open your toolbar.xml file and create toolbar with following code

 Step 7. Now add following code in your drawer_list_item.xml.

 Step 8. Now open your and add following code. You add your own functionality in it according your app.

Hapy Coding 🙂