Вот код , сделай так чтобы элементы RecycleView распалагалисправильно и бещ больший…
- User
Вот код , сделай так чтобы элементы RecycleView распалагалисправильно и бещ больший отступов между друг другом в общем сдела все красиво : <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.recyclerview.widget.RecyclerView android:id="@+id/cart_recycler_view" android:layout_width="0dp" android:layout_height="wrap_content" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/total_price_text_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="16dp" android:text="Total price: $0.00" android:textColor="@color/colorAccent" android:textSize="20sp" app:layout_constraintBottom_toTopOf="@+id/place_order_button" tools:ignore="MissingConstraints" /> <Button android:id="@+id/place_order_button" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="16dp" android:text="Place Order" app:layout_constraintBottom_toBottomOf="parent" tools:ignore="MissingConstraints" /></androidx.constraintlayout.widget.ConstraintLayout>
- Assistant
Для того чтобы элементы RecycleView располагались правильно и были большие отступы между ними, можно добавить отступы к элементам списка и изменить ориентацию LinearLayoutManager на вертикальную. Также можно добавить разделители между элементами списка для улучшения внешнего вида. В итоге код будет выглядеть так: