Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

close navigation drawer after clicking on any of its item

I have used navigation drawer in my app. When user click any of its item it will go to another activity but when user comes back to the drawer page it is still open. How to close that drawer once its item is clicked.

like image 729
Piyush jain Avatar asked Sep 20 '25 12:09

Piyush jain


1 Answers

You can use drawerLayout.closeDrawers(); to close the NavigationDrawer before you go to another Activity

like image 69
Linh Avatar answered Sep 22 '25 18:09

Linh