Пример моего после небольшого разочарования, где добавить этот андроид: clickable = "true"

ценарий: у меня есть кнопка B и выдвижной ящик, который при выдвижении покрывает весь экран. Когда я вытаскиваю экран и касаюсь экрана, на котором раньше был виден B, его действие все еще выполняется.

Как я могу обойти это?

я нашелэто Поток, описывающий ту же самую проблему, но ответ не был принят, и те, которые я не смог заставить работать.

ОБНОВЛЕНИЕ: у меня есть файл с именем Report.java, с соответствующим файлом report.xml, как показано ниже.

    <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">

    <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">
            <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"/>
            <Spinner android:id="@+id/garbageTypeSpinner"
                android:layout_height="wrap_content" 
                android:layout_width="fill_parent"/>
            <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" />
            <TextView android:id="@+id/dateTextView"
                android:layout_width="wrap_content" 
                android:layout_height="wrap_content"
                android:textColor="@color/text" />
            <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" />
            <TextView android:id="@+id/addressTextView"
                android:layout_width="wrap_content" 
                android:layout_height="wrap_content"
                android:textColor="@color/text" />
            <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" />
            <TextView android:id="@+id/positionTextView"
                android:layout_width="wrap_content" 
                android:layout_height="wrap_content"
                android:textColor="@color/text" />
            <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" />
            <EditText android:id="@+id/commentTextBox"
                android:layout_height="fill_parent"
                android:layout_width="fill_parent" 
                android:layout_weight="1"/>
            <Button android:id="@+id/sendCrapportButton" 
                android:onClick="sendCrapport"
                android:layout_height="wrap_content" 
                android:layout_width="fill_parent"
                android:text="Skicka rapport" />

    </LinearLayout>
        <Button android:id="@id/reportSlideButton"
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:text=">"/>
</SlidingDrawer>

Добавление компонентов:

protected void addComponents() {
    takePictureButton = (ImageButton) findViewById(R.id.takePictureButton);
    slidingDrawer = (SlidingDrawer) findViewById(R.id.drawer);
}

Ответы на вопрос(1)

Ваш ответ на вопрос