Вот элемент RecycleView сделай так чтоб это превратилось в Carousel with MotionLayout :…
- User
Вот элемент RecycleView сделай так чтоб это превратилось в Carousel with MotionLayout : <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginStart="4dp" android:layout_marginTop="8dp" android:layout_marginEnd="4dp" android:layout_marginBottom="8dp" android:backgroundTint="@color/transparent">
code<androidx.cardview.widget.CardView android:layout_width="150dp" android:layout_height="200dp" android:layout_marginStart="220dp" android:layout_marginTop="8dp" android:layout_marginEnd="4dp" android:layout_marginBottom="8dp" android:elevation="2dp" android:rotationY="16"> <ImageView android:id="@+id/right_image" android:layout_width="match_parent" android:layout_height="match_parent" android:adjustViewBounds="true" android:rotationX="0" android:scaleType="centerCrop" /> </androidx.cardview.widget.CardView> <androidx.cardview.widget.CardView android:layout_width="150dp" android:layout_height="200dp" android:layout_marginStart="5dp" android:layout_marginTop="8dp" android:layout_marginEnd="4dp" android:layout_marginBottom="8dp" android:elevation="2dp" android:rotationY="-16"> <ImageView android:id="@+id/left_image" android:layout_width="match_parent" android:layout_height="match_parent" android:adjustViewBounds="true" android:scaleType="centerCrop" /> </androidx.cardview.widget.CardView> <androidx.cardview.widget.CardView android:layout_width="150dp" android:layout_height="200dp" android:layout_marginStart="120dp" android:layout_marginTop="4dp" android:layout_marginEnd="4dp" android:layout_marginBottom="8dp" android:elevation="10dp"> <ImageView android:id="@+id/middle_image" android:layout_width="match_parent" android:layout_height="match_parent" android:adjustViewBounds="true" android:scaleType="centerCrop" /> </androidx.cardview.widget.CardView> - Assistant
- User
Создай весь необходимый кодэ
- Assistant
- User
Android resource linking failed com.example.cinema_provider_app-mergeDebugResources-27:/layout/item_custom_type.xml:19: error: attribute rotationY (aka com.example.cinema_provider_app:rotationY) not found. com.example.cinema_provider_app-mergeDebugResources-27:/layout/item_custom_type.xml:39: error: attribute rotationY (aka com.example.cinema_provider_app:rotationY) not found. error: failed linking file resources.
- Assistant
- User
Эти элементы же должны прокру3чивать с анимацией разве нет если да то исправь это
- Assistant
Приношу извинения за путаницу. Действительно, вы желаете создать анимацию прокрутки для элементов Carousel. Чтобы исправить ошибку "attribute rotationY not found", можно использовать элементы MotionLayout для применения анимации к карточкам.
Обновленный код с использованием MotionLayout:
xml<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.motion.widget.MotionLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/motionLayout" android:layout_width="match_parent" android:layout_height="match_parent" android:backgroundTint="@color/transparent"> <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="match_parent"> <androidx.cardview