How to open navigation drawer on button click in main fragment?

后端 未结 5 1903
我在风中等你
我在风中等你 2020-12-08 03:02

I have made an app with one activity which uses a navigation drawer to open a number of different fragments. I have the actionbar drawertoggle, but it is not very visible. I

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-08 03:18

    if you are using from default navigation activity in android you just have to add this code in click listener of button --->

    mDrawerLayout.openDrawer(Gravity.START);
    

    for closing you do not have to do something.

提交回复
热议问题