Android – Navigation drawer – Disable click through on items behind the drawer

androidandroid-fragmentsclick-throughnavigation-drawer

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?

Best Answer

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

Related Topic