ImageViewとチェックボックスを使用してカスタムビューを持っているときに、通常どおりギャラリーを逃げる方法

StackOverflow https://stackoverflow.com/questions/7312505

質問

を持っています android.widget.GalleryImageView そしてa Checkbox 各アイテムに。
ユーザーは削除のために画像をマークできます。

このカスタムがあるとき、私はスクロール/逃げられません View。すべてがうまくロードされており、 CheckBox オントップ。

タッチイベントが広まっていないことを理解しています Gallery
どうすればいいのか、この委任されたタッチについて20の議論を読んだが、何もうまくいきません。

ここに私の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>
役に立ちましたか?

解決

誰かがこれに使用しているなら、私はこれを自分で理解しました。

内側 getView() 削除することによって theimageview.setOnClickListener

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top