Ich bin nur ein Android Anfänger & versucht RecyclerView mit ViewHolder Muster beiRecyclerView mit ViewHolder Muster
mit der Probe zu arbeiten: https://guides.codepath.com/android/using-the-recyclerview#create-the-recyclerview-within-layout
Während Umsetzung des Kodex:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<android.support.v7.widget.RecyclerView
android:id="@+id/rvContacts"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
es ist gebeten, in res/layout/activity_users.xml zu implementieren
Ich habe das Projekt mit Basic A erstellt ctivity & hat die Dateien
activity_main.xml & content_main.xml
Ist activity_users.xml eine andere benutzerdefinierte Datei? oder eine Standarddatei? Können Sie mir sagen, wo es den obigen Code implementieren soll?
Oberhalb des Layouts ist das Layout Ihrer Aktivität zu sehen, legen Sie einfach eine Recycleransicht in Ihr Aktivitätslayout. sonst verwende dieses Layout als Aktivitätslayout –
setze diesen Code in die Hauptaktivität xml – KrishnaJ
Du meinst activity_main.xml? –