I am using Google Design Support Library and DrawerLayout.
Setup:
final DrawerLayout drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
NavigationView drawer = (NavigationView) findViewById(R.id.drawer);
if(mDrawerToggle == null) {
mDrawerToggle = new ActionBarDrawerToggle(this, drawerLayout, mToolbar, R.string.open, R.string.feather_close);
drawerLayout.addDrawerListener(mDrawerToggle);
mDrawerToggle.syncState();
}
When I start my app, the ripple effect of the hamburger icon is shown but the drawer is not opened. When I open the drawer at least one time by sliding from the left, the hamburger icon works for the entire runtime. I don't have a special listener on the toggle button or the drawer itself and the onOptionsItemSelected method is not called.
Please help me to find out what happens.
Thank you.
I found it: I accidentally had android:visibility="gone"
in my NavigationView.
What a freaky side effect.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With