私は単純なGridView Galleryを作成します。私はいくつかの写真を表示します。今私はそれらにチェックを入れようとしています。チェックボックスはイメージ上に表示されますが、クリックアクションは機能しません(onItemClickの前に私は画像を拡大しました)。つまり、チェックボックスの場所以外の写真をクリックするとズームしますが、チェックボックスをクリックすると、チェック/チェックが外されます。チェックボックスがその一部にある場合、ImageViewの実行が停止する
私のxmlファイル:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="@integer/width"
android:layout_height="@integer/height"
android:adjustViewBounds="true"
android:id="@+id/imageView"
android:layout_margin="5dp"
android:layout_centerVertical="true"
android:layout_alignParentEnd="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignRight="@+id/imageView" />
</RelativeLayout>
にこれらattributtesを追加してみてください –
ohh man hole galleryそれはかなり複雑ですか?なぜなら、レイアウトでこのチェックボックスを削除すれば、このすべてがうまくいくということです。写真はズームなどですが、チェックボックスのような行為は、このImageViewの上に表示されますが、彼はwrap_contentなので、私はそれを取得しません。 –
"Android:layout_alignRight =" @ + id/imageView "" –