Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.motion.widget.MotionLayout xmlns:android="http://schemas.android.com/apk/res/android"
<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:id="@+id/base_motionLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#1E0A1E"
app:layoutDescription="@xml/recycler_to_detail_scene"
android:id="@+id/base_motionLayout"
tools:context=".MainActivity">

<androidx.recyclerview.widget.RecyclerView
Expand All @@ -19,17 +20,10 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<!-- <FrameLayout-->
<!-- android:id="@+id/frameLayout"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->

<!-- android:visibility="invisible"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent">-->

<include layout="@layout/recycler_to_detail_item" android:id="@+id/detail" android:layout_width="match_parent"
android:layout_height="100dp" />
<!-- </FrameLayout>-->
<include
android:id="@+id/detail"
layout="@layout/recycler_to_detail_item"
android:layout_width="match_parent"
android:layout_height="100dp" />

</androidx.constraintlayout.motion.widget.MotionLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,20 @@

<Transition
motion:constraintSetEnd="@+id/end"
motion:constraintSetStart="@id/start" >
motion:constraintSetStart="@id/start">
<KeyFrameSet>
<KeyAttribute
android:rotation="45"
motion:framePosition="20"
motion:motionTarget="@+id/button" />
motion:motionTarget="@+id/button" />
<KeyAttribute
android:rotation="45"
motion:framePosition="80"
motion:motionTarget="@+id/button" />

motion:motionTarget="@+id/button" />
</KeyFrameSet>
</Transition>

<ConstraintSet android:id="@+id/start">

<ConstraintOverride android:id="@+id/backdrop">
<CustomAttribute
motion:attributeName="backgroundColor"
Expand All @@ -28,7 +26,6 @@
</ConstraintSet>

<ConstraintSet android:id="@+id/end">

<Constraint
android:id="@+id/backdrop"
android:layout_width="match_parent"
Expand All @@ -37,7 +34,6 @@
motion:attributeName="backgroundColor"
motion:customColorValue="#040404" />
</Constraint>

<Constraint
android:id="@+id/button"
android:layout_width="50dp"
Expand All @@ -47,7 +43,6 @@
motion:layout_constraintHorizontal_bias="0.5"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toTopOf="parent" />

<Constraint
android:id="@+id/image"
android:layout_width="0dp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,53 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<MotionScene
xmlns:android="http://schemas.android.com/apk/res/android"
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:motion="http://schemas.android.com/apk/res-auto">

<Transition
motion:constraintSetEnd="@+id/end"
motion:constraintSetStart="@id/start"
motion:duration="2000">
<KeyFrameSet>
<KeyAttribute motion:motionTarget="@+id/detail" android:alpha="1" motion:framePosition="1"/>
<KeyAttribute motion:motionTarget="@+id/detail" motion:motionProgress="0" motion:framePosition="30"/>
</KeyFrameSet>
<KeyFrameSet>
<KeyAttribute
android:alpha="1"
motion:framePosition="1"
motion:motionTarget="@+id/detail" />
<KeyAttribute
motion:framePosition="30"
motion:motionProgress="0"
motion:motionTarget="@+id/detail" />
</KeyFrameSet>
</Transition>

<ConstraintSet android:id="@+id/start">
<Constraint
android:id="@+id/recyclerView"
motion:layout_constraintEnd_toEndOf="parent"
android:layout_width="match_parent"
android:layout_height="match_parent"
motion:layout_constraintBottom_toBottomOf="parent"
motion:layout_constraintTop_toTopOf="parent"
motion:layout_constraintStart_toStartOf="parent" />
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toTopOf="parent" />
<Constraint
android:id="@+id/detail"
android:layout_width="wrap_content"
android:layout_height="100dp"
android:visibility="invisible"
motion:motionProgress="0"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toTopOf="parent"
motion:layout_constraintStart_toStartOf="parent" />
motion:motionProgress="0" />
</ConstraintSet>

<ConstraintSet android:id="@+id/end">
<Constraint
android:id="@+id/recyclerView"
motion:layout_constraintEnd_toEndOf="parent"
android:layout_width="match_parent"
android:layout_height="match_parent"
motion:layout_constraintBottom_toBottomOf="parent"
motion:layout_constraintTop_toTopOf="parent"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
/>
motion:layout_constraintTop_toTopOf="parent" />
<Constraint
android:id="@+id/detail"
android:layout_width="match_parent"
android:layout_height="match_parent"
motion:motionProgress="1"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toTopOf="parent"
motion:layout_constraintStart_toStartOf="parent" />
motion:motionProgress="1" />
</ConstraintSet>
</MotionScene>