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
ActionBarDrawerToggleclass 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?