Also habe ich recycler view mit cardview in android verwendet und alles hat gut funktioniert ... ich muss nur wissen, wie ich gewarnt werden kann, wenn eine Ansicht in der xml meine Liste ArtikelcodeWoher weiß man, ob die Ansicht im recycler view item angeklickt wird android
<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:layout_height="wrap_content"
android:layout_width="match_parent"
card_view:cardCornerRadius="5dp"
android:id="@+id/child_card"
android:layout_margin="5dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Large Text"
android:id="@+id/child_name"
android:background="@color/colorPrimaryLight"
android:paddingLeft="5dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Medium Text"
android:id="@+id/child_dob"
android:layout_below="@+id/child_name"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:textColor="#000000"
android:paddingLeft="5dp"
android:layout_marginTop="10dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Medium Text"
android:id="@+id/child_gender"
android:textColor="#000000"
android:paddingLeft="5dp"
android:layout_below="@+id/child_dob"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="30dp" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/child_remove"
android:layout_alignBottom="@+id/child_gender"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:src="@drawable/ic_clear_black_24dp"/>
</RelativeLayout>
, was ich brauche, um benachrichtigte die auf Klick ist das Kind entfernen Imageview Listenelement wird nicht das gesamte Liste geklickt Element, um es self.Here ist. Meine Recycler Ansicht wurde initialisiert und arbeitet fine.Thanks im Voraus
versuchen, diese http://stackoverflow.com/a/24933117/3790150 – saeed
dank krank aussehen hinein @saeed – carrion