103 lines
4.3 KiB
XML
103 lines
4.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Copyright (C) 2018 The Android Open Source Project
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
<MotionScene
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:motion="http://schemas.android.com/apk/res-auto">
|
|
|
|
<Transition
|
|
motion:constraintSetStart="@+id/start"
|
|
motion:constraintSetEnd="@+id/end"
|
|
motion:duration="1000"
|
|
motion:interpolator="linear">
|
|
|
|
<OnSwipe
|
|
motion:touchAnchorId="@+id/car"
|
|
motion:touchAnchorSide="right"
|
|
motion:dragDirection="dragRight" />
|
|
|
|
<ConstraintSet android:id="@+id/start">
|
|
<Constraint
|
|
android:id="@id/mountains"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:translationX="10dp"
|
|
android:scaleX="1.2"
|
|
android:scaleY="1.2"
|
|
motion:layout_constraintTop_toTopOf="parent"/>
|
|
<Constraint
|
|
android:id="@id/trees1"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginLeft="30dp"
|
|
android:layout_marginBottom="60dp"
|
|
motion:layout_constraintLeft_toLeftOf="parent"
|
|
motion:layout_constraintBottom_toBottomOf="parent"/>
|
|
<Constraint
|
|
android:id="@id/trees2"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginLeft="90dp"
|
|
android:layout_marginBottom="30dp"
|
|
motion:layout_constraintLeft_toLeftOf="parent"
|
|
motion:layout_constraintBottom_toBottomOf="parent"/>
|
|
<Constraint
|
|
android:id="@id/car"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginLeft="20dp"
|
|
android:layout_marginBottom="8dp"
|
|
motion:layout_constraintLeft_toLeftOf="parent"
|
|
motion:layout_constraintBottom_toBottomOf="parent"/>
|
|
</ConstraintSet>
|
|
|
|
<ConstraintSet android:id="@+id/end">
|
|
<Constraint
|
|
android:id="@id/mountains"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:translationX="-10dp"
|
|
android:scaleX="1.2"
|
|
android:scaleY="1.2"
|
|
motion:layout_constraintTop_toTopOf="parent"/>
|
|
<Constraint
|
|
android:id="@id/trees1"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginLeft="0dp"
|
|
android:layout_marginBottom="60dp"
|
|
motion:layout_constraintLeft_toLeftOf="parent"
|
|
motion:layout_constraintBottom_toBottomOf="parent"/>
|
|
<Constraint
|
|
android:id="@id/trees2"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginLeft="20dp"
|
|
android:layout_marginBottom="30dp"
|
|
motion:layout_constraintLeft_toLeftOf="parent"
|
|
motion:layout_constraintBottom_toBottomOf="parent"/>
|
|
<Constraint
|
|
android:id="@id/car"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginRight="20dp"
|
|
android:layout_marginBottom="8dp"
|
|
motion:layout_constraintRight_toRightOf="parent"
|
|
motion:layout_constraintBottom_toBottomOf="parent"/>
|
|
</ConstraintSet>
|
|
|
|
</Transition>
|
|
|
|
</MotionScene> |