added a LayoutManager to fragment_shoppinglist_shoplist.xml

added a ShoppinglistShoplistAdapter.kt for the shoplist RecyclerView
added a data class for the ShoppinglistShoplistAdapter.kt
modified the layout of the fragment_shoppinglist_shoplist_item.xml
refactored the ShoplistFragment.kt
added samplecode for the RecyclerView to the ShoplistFragment.kt
This commit is contained in:
2024-06-02 16:55:41 +02:00
parent a355301d68
commit 9e54bbc978
5 changed files with 70 additions and 9 deletions

View File

@@ -14,5 +14,6 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -3,11 +3,14 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="15dp"
app:cardBackgroundColor="@color/cardview_background"
app:cardCornerRadius="20dp"
app:layout_constraintBottom_toBottomOf="parent"