blob: 44fb556146cab2c3fd807545425e40a098ad606d [file] [log] [blame]
George Lin8d3ba602023-01-16 06:58:07 +00001<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Copyright (C) 2023 The Android Open Source Project
4
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16-->
17<MotionScene
18 xmlns:android="http://schemas.android.com/apk/res/android"
19 xmlns:motion="http://schemas.android.com/apk/res-auto">
20
21 <Transition
22 motion:constraintSetStart="@id/start"
23 motion:constraintSetEnd="@+id/next"
24 motion:duration="1000"
25 android:id="@+id/forward">
26 <OnSwipe
27 motion:dragDirection="dragLeft"
28 motion:touchAnchorSide="left" />
29 </Transition>
30
31 <Transition
32 motion:constraintSetStart="@+id/start"
33 motion:constraintSetEnd="@+id/previous"
34 android:id="@+id/backward">
35 <OnSwipe
36 motion:dragDirection="dragRight"
37 motion:touchAnchorSide="right" />
38 </Transition>
39
40 <ConstraintSet android:id="@+id/previous">
41 <Constraint
42 android:id="@+id/item_view_0"
George Lincfc74972023-02-14 21:53:04 +000043 android:layout_width="@dimen/clock_carousel_item_width"
44 android:layout_height="@dimen/clock_carousel_item_height"
George Lin7ee3e1e2023-03-03 18:25:32 +000045 android:scaleX="@dimen/clock_carousel_scale"
46 android:scaleY="@dimen/clock_carousel_scale"
47 android:alpha="@dimen/clock_carousel_alpha"
George Lin8d3ba602023-01-16 06:58:07 +000048 motion:layout_constraintEnd_toStartOf="@id/guideline_start"
49 motion:layout_constraintTop_toTopOf="parent"
George Lincfc74972023-02-14 21:53:04 +000050 motion:layout_constraintBottom_toBottomOf="parent" />
George Lin8d3ba602023-01-16 06:58:07 +000051 <Constraint
52 android:id="@+id/item_view_1"
George Lincfc74972023-02-14 21:53:04 +000053 android:layout_width="@dimen/clock_carousel_item_width"
54 android:layout_height="@dimen/clock_carousel_item_height"
55 motion:layout_constraintWidth_max="@dimen/clock_carousel_item_width"
George Lin8d3ba602023-01-16 06:58:07 +000056 motion:layout_constraintHorizontal_bias="0.5"
George Lincfc74972023-02-14 21:53:04 +000057 motion:layout_constraintStart_toStartOf="parent"
58 motion:layout_constraintEnd_toEndOf="parent"
George Lin8d3ba602023-01-16 06:58:07 +000059 motion:layout_constraintTop_toTopOf="parent"
George Lincfc74972023-02-14 21:53:04 +000060 motion:layout_constraintBottom_toBottomOf="parent" />
George Lin8d3ba602023-01-16 06:58:07 +000061 <Constraint
62 android:id="@+id/item_view_2"
George Lincfc74972023-02-14 21:53:04 +000063 android:layout_width="@dimen/clock_carousel_item_width"
64 android:layout_height="@dimen/clock_carousel_item_height"
George Lin7ee3e1e2023-03-03 18:25:32 +000065 android:scaleX="@dimen/clock_carousel_scale"
66 android:scaleY="@dimen/clock_carousel_scale"
67 android:alpha="@dimen/clock_carousel_alpha"
George Lin8d3ba602023-01-16 06:58:07 +000068 motion:layout_constraintStart_toStartOf="@id/guideline_end"
69 motion:layout_constraintTop_toTopOf="parent"
George Lincfc74972023-02-14 21:53:04 +000070 motion:layout_constraintBottom_toBottomOf="parent" />
George Lin8d3ba602023-01-16 06:58:07 +000071 </ConstraintSet>
72
73 <ConstraintSet android:id="@+id/start">
74 <Constraint
75 android:id="@+id/item_view_1"
George Lincfc74972023-02-14 21:53:04 +000076 android:layout_width="@dimen/clock_carousel_item_width"
77 android:layout_height="@dimen/clock_carousel_item_height"
George Lin7ee3e1e2023-03-03 18:25:32 +000078 android:scaleX="@dimen/clock_carousel_scale"
79 android:scaleY="@dimen/clock_carousel_scale"
80 android:alpha="@dimen/clock_carousel_alpha"
George Lin8d3ba602023-01-16 06:58:07 +000081 motion:layout_constraintEnd_toStartOf="@id/guideline_start"
82 motion:layout_constraintTop_toTopOf="parent"
George Lincfc74972023-02-14 21:53:04 +000083 motion:layout_constraintBottom_toBottomOf="parent" />
George Lin8d3ba602023-01-16 06:58:07 +000084 <Constraint
85 android:id="@+id/item_view_2"
George Lincfc74972023-02-14 21:53:04 +000086 android:layout_width="@dimen/clock_carousel_item_width"
87 android:layout_height="@dimen/clock_carousel_item_height"
88 motion:layout_constraintWidth_max="@dimen/clock_carousel_item_width"
George Lin8d3ba602023-01-16 06:58:07 +000089 motion:layout_constraintHorizontal_bias="0.5"
George Lincfc74972023-02-14 21:53:04 +000090 motion:layout_constraintStart_toStartOf="parent"
91 motion:layout_constraintEnd_toEndOf="parent"
George Lin8d3ba602023-01-16 06:58:07 +000092 motion:layout_constraintTop_toTopOf="parent"
George Lincfc74972023-02-14 21:53:04 +000093 motion:layout_constraintBottom_toBottomOf="parent" />
George Lin8d3ba602023-01-16 06:58:07 +000094 <Constraint
95 android:id="@+id/item_view_3"
George Lincfc74972023-02-14 21:53:04 +000096 android:layout_width="@dimen/clock_carousel_item_width"
97 android:layout_height="@dimen/clock_carousel_item_height"
George Lin7ee3e1e2023-03-03 18:25:32 +000098 android:scaleX="@dimen/clock_carousel_scale"
99 android:scaleY="@dimen/clock_carousel_scale"
100 android:alpha="@dimen/clock_carousel_alpha"
George Lin8d3ba602023-01-16 06:58:07 +0000101 motion:layout_constraintStart_toStartOf="@id/guideline_end"
102 motion:layout_constraintTop_toTopOf="parent"
George Lincfc74972023-02-14 21:53:04 +0000103 motion:layout_constraintBottom_toBottomOf="parent" />
George Lin8d3ba602023-01-16 06:58:07 +0000104 </ConstraintSet>
105
106 <ConstraintSet android:id="@+id/next">
107 <Constraint
108 android:id="@+id/item_view_2"
George Lincfc74972023-02-14 21:53:04 +0000109 android:layout_width="@dimen/clock_carousel_item_width"
110 android:layout_height="@dimen/clock_carousel_item_height"
George Lin7ee3e1e2023-03-03 18:25:32 +0000111 android:scaleX="@dimen/clock_carousel_scale"
112 android:scaleY="@dimen/clock_carousel_scale"
113 android:alpha="@dimen/clock_carousel_alpha"
George Lin8d3ba602023-01-16 06:58:07 +0000114 motion:layout_constraintEnd_toStartOf="@id/guideline_start"
115 motion:layout_constraintTop_toTopOf="parent"
George Lincfc74972023-02-14 21:53:04 +0000116 motion:layout_constraintBottom_toBottomOf="parent" />
George Lin8d3ba602023-01-16 06:58:07 +0000117 <Constraint
118 android:id="@+id/item_view_3"
George Lincfc74972023-02-14 21:53:04 +0000119 android:layout_width="@dimen/clock_carousel_item_width"
120 android:layout_height="@dimen/clock_carousel_item_height"
121 motion:layout_constraintWidth_max="@dimen/clock_carousel_item_width"
George Lin8d3ba602023-01-16 06:58:07 +0000122 motion:layout_constraintHorizontal_bias="0.5"
George Lincfc74972023-02-14 21:53:04 +0000123 motion:layout_constraintStart_toStartOf="parent"
124 motion:layout_constraintEnd_toEndOf="parent"
George Lin8d3ba602023-01-16 06:58:07 +0000125 motion:layout_constraintTop_toTopOf="parent"
George Lincfc74972023-02-14 21:53:04 +0000126 motion:layout_constraintBottom_toBottomOf="parent" />
George Lin8d3ba602023-01-16 06:58:07 +0000127 <Constraint
128 android:id="@+id/item_view_4"
George Lincfc74972023-02-14 21:53:04 +0000129 android:layout_width="@dimen/clock_carousel_item_width"
130 android:layout_height="@dimen/clock_carousel_item_height"
George Lin7ee3e1e2023-03-03 18:25:32 +0000131 android:scaleX="@dimen/clock_carousel_scale"
132 android:scaleY="@dimen/clock_carousel_scale"
133 android:alpha="@dimen/clock_carousel_alpha"
George Lin8d3ba602023-01-16 06:58:07 +0000134 motion:layout_constraintStart_toStartOf="@id/guideline_end"
135 motion:layout_constraintTop_toTopOf="parent"
George Lincfc74972023-02-14 21:53:04 +0000136 motion:layout_constraintBottom_toBottomOf="parent" />
George Lin8d3ba602023-01-16 06:58:07 +0000137 </ConstraintSet>
138
139</MotionScene>