android - Click listener on a view on top of another -
i have cardview , list inside it. but, when click on cardview doesn't receive click callbacks because list on top of it. solution solve this?
i tried make list unclickable ; didn't work!
xml layout
<?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.cardview xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" android:id="@+id/card_view" style="@style/cardviewstyle" card_view:cardcornerradius="2dp" xmlns:tools="http://schemas.android.com/tools"> <relativelayout android:layout_width="match_parent" android:layout_height="wrap_content"> <textview android:id="@+id/text_view_entry_status" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textcolor="@color/accent" android:background="@color/green_700" android:paddingtop="2dp" android:paddingbottom="2dp" android:paddingstart="8dp" android:textstyle="bold" android:paddingend="8dp" android:layout_alignparentend="true" tools:text="entry status label text" /> <android.support.v7.widget.recyclerview android:id="@+id/recycler_view_entry_fields" android:layout_width="match_parent" android:layout_height="wrap_content" android:clickable="false" android:focusable="false" android:layout_below="@+id/text_view_entry_status" android:layout_margintop="16dp" /> <relativelayout android:id="@+id/relative_layout_delete_entry" android:layout_width="48dp" android:layout_height="48dp" android:layout_alignparentend="true" android:layout_below="@+id/recycler_view_entry_fields"> <imageview android:id="@+id/image_view_delete_entry" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerinparent="true" android:src="@drawable/ic_delete_black_24dp" /> </relativelayout> </relativelayout> </android.support.v7.widget.cardview>
Comments
Post a Comment