jeudi 18 mai 2017

ImageView stop being clicable when check box is on part of it

I create simple GridView Gallery. I display some photos. Now I'm trying to put on them check box. Check box is visible on my Images but now click action doesn't work (Before onItemClick I zoomed picture). So the idea is that if I click on photo except place for check box it zoom, but if I click on checkbox it checked/unchecked.

my xml file:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
    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>




Aucun commentaire:

Enregistrer un commentaire