what I am trying to do is show a custom card in a recyclerview.
I can see it on the design view on android studio, but no when the emulator runs.
I just need to display de listItem.
Is is posible? if so, any help or suggestion would be great, thanks.
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rcvPoolVariables"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="22dp"
android:layout_marginStart="17dp"
android:layout_marginEnd="17dp"
tools:listitem="@layout/row_pool_objectives"
app:layout_constraintTop_toBottomOf="@+id/containerVariableAndWeeks"
app:layout_constraintBottom_toBottomOf="parent"/>
2
Answers
If the "preliminary version" is shown in the design tab, then there are no errors on the part of xml documents. It’s in "regular" code part. I think the error lies in the output of elements on the device – either you do not pass data objects for output in recycler view, or there is an error in the processing of this data. Check the recycler view classes architecture and code of an adapter class. Also read this guide, I hope it’ll help you.
1.xml
2.java file
3.Adapter class id define and assign and model class to variable getter setter set