Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid SlidingDrawer doesn't disable buttons 'under' the drawer
    primarykey
    data
    text
    <p>This is the scenario: I have a button B, and a slidingdrawer that when pulled out covers the entire screen. When I pull out the screen, and touch the screen where B used to be visible, its action is still executed. </p> <p>How can I get around this? </p> <p>I found <a href="https://stackoverflow.com/questions/2596571/how-can-i-disable-a-view-behind-my-slidingdrawer-in-android">this</a> thread describing the very same problem, but no answer was accepted and the ones given I didn't manage to get working. </p> <p>UPDATE: I have a file named Report.java, with a corresponding report.xml file as seen below.</p> <pre><code> &lt;SlidingDrawer android:id="@+id/drawer" android:layout_width="fill_parent" android:layout_height="wrap_content" android:handle="@+id/reportSlideButton" android:content="@+id/reportContent" android:orientation="horizontal"&gt; &lt;LinearLayout android:id="@id/reportContent" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:layout_weight="1" android:padding="10dp" android:background="@color/bg_color"&gt; &lt;TextView android:id="@+id/garbageTypeTextView" android:layout_height="wrap_content" android:textColor="@color/text" android:layout_width="fill_parent" android:text="@string/garbageTypeString" android:textStyle="bold"/&gt; &lt;Spinner android:id="@+id/garbageTypeSpinner" android:layout_height="wrap_content" android:layout_width="fill_parent"/&gt; &lt;TextView android:id="@+id/textViewForDateTitle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/dateString" android:textColor="@color/text" android:textStyle="bold" /&gt; &lt;TextView android:id="@+id/dateTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/text" /&gt; &lt;TextView android:id="@+id/textViewForAddressTitle" android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/addressString" android:textColor="@color/text" android:textStyle="bold" /&gt; &lt;TextView android:id="@+id/addressTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/text" /&gt; &lt;TextView android:id="@+id/textViewForPositionTitle" android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/positionString" android:textColor="@color/text" android:textStyle="bold" /&gt; &lt;TextView android:id="@+id/positionTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/text" /&gt; &lt;TextView android:id="@+id/textViewForCommentTitle" android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/commentString" android:textColor="@color/text" android:textStyle="bold" /&gt; &lt;EditText android:id="@+id/commentTextBox" android:layout_height="fill_parent" android:layout_width="fill_parent" android:layout_weight="1"/&gt; &lt;Button android:id="@+id/sendCrapportButton" android:onClick="sendCrapport" android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="Skicka rapport" /&gt; &lt;/LinearLayout&gt; &lt;Button android:id="@id/reportSlideButton" android:layout_width="40dp" android:layout_height="40dp" android:text="&gt;"/&gt; &lt;/SlidingDrawer&gt; </code></pre> <p>Adding components:</p> <pre><code>protected void addComponents() { takePictureButton = (ImageButton) findViewById(R.id.takePictureButton); slidingDrawer = (SlidingDrawer) findViewById(R.id.drawer); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload