Navigation drawer - Disable click through on items behind the drawer

user1240989 picture user1240989 · Jul 6, 2013 · Viewed 22.8k times · Source

Is there any way to make sure that the navigation drawer stays on top of the content in the fragment?

I created a small test application with dummy data. 10 fragments with a corresponding numbered button and textview. The issue is with the fact that the fragment elements seem to have higher priority than the navigation drawer.

enter image description here

As seen in the screenshot, once I attempt to open up the "0 fragment" it instead opts to register the click on the button behind the navigation drawer. Pressing any other content item works fine, but this is as long as there are no other interactable items beneath them. What can I do to have the navigation drawer properly stay on top of the content behind it?

Answer

Gennadiy Ryabkin picture Gennadiy Ryabkin · Oct 11, 2013

Set android:clickable="true" tag on sliding pane layout.