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:
@@ -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>
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user