Created
October 25, 2022 12:33
-
-
Save rodrigomartind/73a2a15dd82c69e6da8f677cddb0ac68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
app:layoutDescription="@xml/activity_carousel_demo_scene" | |
tools:context=".CarouselDemo"> | |
<View | |
android:id="@+id/imageView0" | |
android:layout_width="140dp" | |
android:layout_height="140dp" | |
app:layout_constraintStart_toEndOf="parent" | |
app:layout_constraintTop_toTopOf="parent" /> | |
<View | |
android:id="@+id/imageView1" | |
android:layout_width="120dp" | |
android:layout_height="120dp" | |
app:layout_constraintTop_toTopOf="parent" | |
app:layout_constraintEnd_toEndOf="parent" | |
app:layout_constraintStart_toStartOf="parent" | |
app:layout_constraintBottom_toBottomOf="parent"/> | |
<View | |
android:id="@+id/imageView2" | |
android:layout_width="100dp" | |
android:layout_height="100dp" | |
android:layout_marginEnd="16dp" | |
app:layout_constraintEnd_toStartOf="@id/imageView1" | |
app:layout_constraintTop_toTopOf="@id/imageView1" | |
app:layout_constraintBottom_toBottomOf="@id/imageView1"/> | |
<View | |
android:id="@+id/imageView3" | |
android:layout_width="80dp" | |
android:layout_height="80dp" | |
android:layout_marginTop="24dp" | |
app:layout_constraintEnd_toEndOf="@id/imageView1" | |
app:layout_constraintStart_toStartOf="@id/imageView1" | |
app:layout_constraintTop_toBottomOf="@id/imageView1" /> | |
<View | |
android:id="@+id/imageView4" | |
android:layout_width="60dp" | |
android:layout_height="60dp" | |
android:layout_marginStart="34dp" | |
app:layout_constraintTop_toTopOf="@id/imageView1" | |
app:layout_constraintBottom_toBottomOf="@id/imageView1" | |
app:layout_constraintStart_toEndOf="@id/imageView1" | |
/> | |
<View | |
android:id="@+id/imageView5" | |
android:layout_width="40dp" | |
android:layout_height="40dp" | |
android:layout_marginBottom="56dp" | |
app:layout_constraintBottom_toTopOf="@id/imageView1" | |
app:layout_constraintEnd_toEndOf="@id/imageView1" | |
app:layout_constraintStart_toStartOf="@id/imageView1"/> | |
<View | |
android:id="@+id/imageView6" | |
android:layout_width="10dp" | |
android:layout_height="10dp" | |
android:alpha="0" | |
android:layout_marginBottom="72dp" | |
app:layout_constraintBottom_toTopOf="@id/imageView1" | |
app:layout_constraintEnd_toEndOf="@id/imageView1" | |
app:layout_constraintStart_toStartOf="@id/imageView1" /> | |
<androidx.constraintlayout.helper.widget.Carousel | |
android:id="@+id/carousel" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
app:carousel_backwardTransition="@+id/backward" | |
app:carousel_firstView="@+id/imageView1" | |
app:carousel_forwardTransition="@+id/forward" | |
app:carousel_nextState="@+id/next" | |
app:carousel_infinite="true" | |
app:carousel_previousState="@+id/previous" | |
app:constraint_referenced_ids="imageView0,imageView1,imageView2,imageView3,imageView4,imageView5,imageView6" /> | |
</androidx.constraintlayout.motion.widget.MotionLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment