Question

I have an android.widget.Gallery with ImageView and a Checkbox on each Item.
The user can mark images for deletion.

I Cannot scroll/fling when i have this custom View. Everything is loading fine and a see the images having the CheckBox ontop.

I understand that the touch event is not propagated down to the Gallery
How can i do that i read 20 discussions about this delegating touch but nothing works.

Heres my xml:

    <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:layout_width="fill_parent" 
                android:layout_height="fill_parent"
                android:clickable="false"
                android:focusable="false"
                >

    <ImageView android:id="@+id/thumbImage" 
               android:layout_width="wrap_content"
               android:layout_height="wrap_content" 
               android:layout_centerInParent="true" 
               android:clickable="false"
               android:focusable="false"
               />

    <CheckBox android:id="@+id/itemCheckBox" 
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentBottom="true"
              android:clickable="false"
              />
</RelativeLayout>
Was it helpful?

Solution

If someone has use for this i just figured this out myself.

Inside the getView() by removing theimageview.setOnClickListener

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top