Android SlidingDrawer doesn't disable buttons 'under' the drawer Android SlidingDrawer doesn't disable buttons 'under' the drawer android android

Android SlidingDrawer doesn't disable buttons 'under' the drawer


you could add android:clickable="true" to your slider content tag (id reportContent). that way it won't "click through". your buttons inside the slider should still work.. i hope ;)


Just adding to @f-horn 's answer:

If you include a layout from a different file (like I do) for the SlidingDrawer, you have to put the 'android:clickable="true"' in the included layout file, not in the include tag. Let me rather use an example:

This will not work:

main.xml

<SlidingDrawer  android:handle="@+id/handle"       android:content="@+id/content">        <ImageView android:id="@id/handle" />        <include android:id="@+id/content" layout="@layout/some_other_layout"         android:clickable="true"/></SlidingDrawer>'

This will:

main.xml

<SlidingDrawer  android:handle="@+id/handle"        android:content="@+id/content">        <ImageView android:id="@id/handle" />        <include android:id="@+id/content" layout="@layout/some_other_layout"/></SlidingDrawer>'

some_other_layout.xml:

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:clickable="true"> ............<LinearLayout/>


I think you should add a touch listener on slider and return true on it. In that way, you will tell to the system that the touch event has been consumed.