download the latest version of the template

Next copy the folder that's inside the root of the zip file , named `MaterialNavigationDrawerActivity`, to the directory located in :

Now restart your Android Studio and click on

Select Material Drawer Activity

Now change the parameters according to your needs.



Drawer bellow toolbar with a darken effect on the toolbar. Drawer bellow toolbar with a darken effect on the toolbar.

Drawer bellow toolbar Drawer bellow toolbar

Drawer on top of toolbar. Uses ScrimInsetsFrameLayout if API>19 Drawer on top of toolbar. Uses ScrimInsetsFrameLayout if API>19



Simple drawer with just a RecyclerView Simple drawer with just a RecyclerView

Google material navigation drawer. Methods like setUserData will be available Google material navigation drawer. Methods like setUserData will be available

public List getMenu() { List items = new ArrayList (); items.add(new NavigationItem(getString(R.string.search), getResources().getDrawable(R.drawable.ic_action_search))); items.add(new NavigationItem(getString(R.string.stats), getResources().getDrawable(R.drawable.ic_action_trending_up))); items.add(new NavigationItem(getString(R.string.myaccount), getResources().getDrawable(R.drawable.ic_action_account_box))); items.add(new NavigationItem(getString(R.string.settings), getResources().getDrawable(R.drawable.ic_action_settings))); return items; }

<color name="myPrimaryColor">#00BCD4</color> <color name="myPrimaryDarkColor">#0097A7</color> <color name="myAccentColor">#CDDC39</color>

@Override public void onNavigationDrawerItemSelected(int position) { Fragment fragment; switch (position) { case 0: //search//todo break; case 1: //stats fragment = getFragmentManager().findFragmentByTag(StatsFragment.TAG); if (fragment == null) { fragment = new StatsFragment(); } getFragmentManager().beginTransaction().replace(R.id.container, fragment, StatsFragment.TAG).commit(); break; case 2: //my account //todo break; case 3: //settings //todo break; } }

<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item android:id="@+id/action_search" android:title="@string/action_search" app:showAsAction="always" android:icon="@drawable/ic_action_search_white"/> <item android:id="@+id/action_filter" android:title="@string/action_filter" app:showAsAction="ifRoom" android:icon="@drawable/ic_action_filter_white"/> </menu>

This post will help you install my Material Navigation Drawer template on Android Studio. This will help you create applications using material design faster than any other template.Firston my github:`{Android Studio location}\plugins\android\lib\templates\activities`Your directory should now look like this:`File > New > New Project...`Change the name of your application. Click next and set your minimum SDK. This library will only work for API level greater or equal than 7.On Navigation Style there are 3 different styles:And finally on Drawer Style there are 2 types:Once you click `Finish` Android Studio will start building the project. After all the tasks are finished you can run your project and see your new application.You can start working from here. Here are some TODO guide lines to help you:Keep adapting the code to your needs and happy programming :)Example program code can be found here: https://github.com/kanytu/template_example The template might change once in a while. Make sure to check my github to keep your template up-to-date.Android Studio will remove the template on each update. You need to install it after each update.