I want to open drawer from right side, but when swite it works but when i click on toggle button in action bar it force close and give error that \"No drawer view fo
i have same issue, and i fix it bellow:
toolbar = (Toolbar) findViewById(R.id.tool_bar);
Drawer = (DrawerLayout) findViewById(R.id.DrawerLayout);
mDrawerToggle = new ActionBarDrawerToggle(this,Drawer,toolbar,R.string.openDrawer,R.string.closeDrawer){
@Override
public void onDrawerOpened(View drawerView) {
super.onDrawerOpened(drawerView);
}
@Override
public void onDrawerClosed(View drawerView) {
super.onDrawerClosed(drawerView);
}
}; // Drawer Toggle Object Made
Drawer.setDrawerListener(mDrawerToggle);
mDrawerToggle.syncState();
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (Drawer.isDrawerOpen(Gravity.RIGHT)) {
Drawer.closeDrawer(Gravity.RIGHT);
} else {
Drawer.openDrawer(Gravity.RIGHT);
}
}
});
yes, it's work, i'm fix this bug in 5hour :( but i'm very happy when resolve it. ^^ thanks & good luck