How to open Drawer Layout only with button?

后端 未结 4 1589
轻奢々
轻奢々 2020-12-14 13:35

I\'m working on application that has a tab structure, and use sliding movements to move through the tabs.

But now, I want to apply Drawer Layout. The problem is tha

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-14 14:36

    you can write this way

     mButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
    
                drawer.openDrawer(navigationView);
    
            }
        });
    

提交回复
热议问题