LibreTube/app/src/main/res/xml/player_scene.xml
Farbod 972d1497a3 youtube motion done!
next is exoplayer damn it
2021-12-12 16:08:23 +04:00

96 lines
4.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<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="10"
motion:motionInterpolator="easeInOut"
>
<KeyFrameSet>
<KeyAttribute
motion:motionTarget="@+id/close_imageView"
motion:framePosition="90"
android:alpha="0" />
<KeyAttribute
motion:motionTarget="@+id/play_imageView"
motion:framePosition="90"
android:alpha="0" />
<KeyAttribute
motion:motionTarget="@+id/title_textView"
motion:framePosition="95"
android:alpha="0" />
</KeyFrameSet>
<OnSwipe
motion:touchAnchorId="@+id/main_container"
motion:dragDirection="dragDown"
motion:touchAnchorSide="bottom"
motion:maxAcceleration="40"
motion:dragScale="6"
/>
</Transition>
<ConstraintSet android:id="@+id/start">
</ConstraintSet>
<ConstraintSet android:id="@+id/end">
<Constraint
android:id="@+id/scrollView2"
motion:layout_constraintEnd_toEndOf="parent"
android:layout_width="0dp"
android:layout_height="1dp"
motion:layout_constraintBottom_toBottomOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/main_container"
motion:layout_constraintHorizontal_bias="0.5"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintVertical_bias="1.0" />
<Constraint
android:id="@+id/main_container"
motion:layout_constraintEnd_toEndOf="parent"
android:layout_width="match_parent"
android:layout_height="54dp"
motion:layout_constraintHorizontal_bias="0.5"
motion:layout_constraintTop_toTopOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintBottom_toBottomOf="parent"
motion:layout_constraintVertical_bias="1.0" />
<Constraint
android:id="@+id/player"
android:layout_width="100dp"
android:layout_height="0dp"
motion:layout_constraintBottom_toBottomOf="@id/main_container"
motion:layout_constraintTop_toTopOf="@id/main_container"
motion:layout_constraintStart_toStartOf="@id/main_container" />
<Constraint
android:id="@+id/close_imageView"
motion:layout_constraintEnd_toEndOf="@id/main_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
motion:layout_constraintBottom_toBottomOf="@id/main_container"
android:layout_marginEnd="16dp"
android:alpha="1"
motion:layout_constraintTop_toTopOf="@id/main_container" />
<Constraint
android:id="@+id/play_imageView"
motion:layout_constraintEnd_toStartOf="@+id/close_imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
motion:layout_constraintBottom_toBottomOf="@+id/close_imageView"
android:layout_marginEnd="24dp"
android:alpha="1"
motion:layout_constraintTop_toTopOf="@+id/close_imageView" />
<Constraint
android:id="@+id/title_textView"
motion:layout_constraintEnd_toStartOf="@+id/play_imageView"
motion:layout_constraintStart_toEndOf="@+id/player"
android:layout_width="0dp"
android:layout_height="wrap_content"
motion:layout_constraintBottom_toBottomOf="@+id/play_imageView"
android:layout_marginEnd="12dp"
android:alpha="1"
android:layout_marginStart="8dp"
motion:layout_constraintTop_toTopOf="@+id/play_imageView" />
</ConstraintSet>
</MotionScene>