Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent android Navigation Drawer from closing till a condition is met

I have a NavigationDrawer having a list with many radio buttons.I want the user to have to select a list item before he can close the Drawer.
The drawer should not close till the item is selected.
Is there a clean way with which I can achieve this??

like image 834
Rajul Avatar asked Dec 20 '22 03:12

Rajul


1 Answers

Set up the DrawerLayout lock mode setDrawerLockMode as follow:

 mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_OPEN);

but you need to handle actionbar home up button.

like image 73
Ahmad Kayyali Avatar answered Jan 14 '23 01:01

Ahmad Kayyali