Navigation Drawer without Actionbar

后端 未结 2 1200
遇见更好的自我
遇见更好的自我 2020-12-30 23:54

I searched many sites (stackoverflow as well) but couldn\'t understand how to implement the navigation drawer without the action bar. I know that this question has already b

2条回答
  •  梦毁少年i
    2020-12-31 00:14

    Just add your DrawerLayout like @mohan did, then if you have a button or something you tap on and want to open the drawer, just do like this :

    drawer.openDrawer(Gravity.LEFT);
    

    and to close :

    drawer.closeDrawer(Gravity.LEFT);
    

提交回复
热议问题