howto fling the Gallery as normal when having custom view with ImageView and CheckBox
I have an android.widget.Gallery
with ImageView
and a Checkbox
on each Item.
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
Heres my xml:
<?xml ve开发者_Python百科rsion="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>
If someone has use for this i just figured this out myself.
Inside the getView()
by removing theimageview.setOnClickListener
精彩评论