UPDATE: I have found the hamburger icon from google's github (https://github.com/google/material-design-icons/blob/master/navigation/drawable-xxhdpi/ic_menu_white_48dp.png) but passing the drawable resource to the ActionBarDrawerToggle and calling syncState doesn't show the hamburger icon contrary to other post's suggestions (Appcompatv7 - v21 Navigation drawer not showing hamburger icon)
OLD QUESTION: I was making a navigation bar for my android app and I realized that the hamburger icon was missing. I followed this question (Appcompatv7 - v21 Navigation drawer not showing hamburger icon) and realized that I must call a mDrawerToggle.syncState();
... Now to create an ActionBarDrawerToggle
class I need the following:
- activity - The Activity hosting the drawer
- drawerLayout - The DrawerLayout to link to the given Activity's ActionBar
- drawerImageRes - A Drawable resource to use as the drawer indicator
- openDrawerContentDescRes - A String resource to describe the "open drawer" - action for accessibility
- closeDrawerContentDescRes - A String resource to describe the "close drawer" action for accessibility
I passed in this
as the activity (I'm calling this from my main activity), drawerLayout as my actual drawer layout and the docs weren't really explaining what the last two params do so I just created some placeholder string resources and passed them in. But I do understand that the drawerImageRes is required to show the hamburger icon, I just don't know where to get it form..
Can anyone tell me where I can get the hamburger icon?
EDIT:
I figured out that the android example from https://developer.android.com/training/implementing-navigation/nav-drawer.html uses R.drawable.ic_drawer
but I don't know where it's come from... The android developer website also says:
The standard navigation drawer icon is available in the Download the Action Bar Icon Pack.
But I downloaded the pack and the lollipop hamburger isn't there...