Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Navigation Drawer disable backview when drawer open

I am getting a strage behaviour with my navigation drawer. I use a custom layout for it, containing not only the usual listview!

Whenever i click somehwere in the drawer section the rows from the behind listview are getting clicked. How can i disable that?

SOLUTION: just set android:clickable="true" on the parent layout in the drawer outside the listview and it all works fine.

Thanks for your answers.

like image 234
Adrian Olar Avatar asked Jan 27 '14 11:01

Adrian Olar


People also ask

How do I get navigation drawer in all activity?

The user can view the navigation drawer when they swipe the activity's screen from the left edge of the android device. A user can also find it from the activity, by tapping the app icon (also known as the “hamburger” menu) in the action bar.


1 Answers

Try this in your MainAcivty with the drawer content when it's open, to disable sending touch events to parent layout

getParent().requestDisallowInterceptTouchEvent(true);
like image 184
Aashir Avatar answered Nov 13 '22 11:11

Aashir