unlock drawer_layout when it is locked

后端 未结 2 2014
执念已碎
执念已碎 2020-12-21 17:27

I have a mainactivity where I have created a method to lock/unlock the drawer_layout and locked it in the onCreate() method.

public void disable         


        
2条回答
  •  佛祖请我去吃肉
    2020-12-21 18:01

    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.

提交回复
热议问题