I have a mainactivity where I have created a method to lock/unlock the drawer_layout and locked it in the onCreate() method.
onCreate()
public void disable
you have to initialize toggle again.
toggle = new ActionBarDrawerToggle(this, mDrawerLayout, mToolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close); mDrawerLayout.addDrawerListener(toggle);
After that, it unlocked.