blob: 345f6906001e3acfb89fc72681f0d4724c3b6b74 [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 Lin542b77b2023-01-25 14:33:24 +000043 android:layout_width="@dimen/clock_carousel_item_small_size"
44 android:layout_height="@dimen/clock_carousel_item_small_size"
George Lin8d3ba602023-01-16 06:58:07 +000045 motion:layout_constraintEnd_toStartOf="@id/guideline_start"
46 motion:layout_constraintTop_toTopOf="parent"
47 motion:layout_constraintBottom_toBottomOf="parent"
48 android:layout_marginEnd="16dp" />
49 <Constraint
50 android:id="@+id/item_view_1"
51 android:layout_width="0dp"
52 android:layout_height="0dp"
53 motion:layout_constraintDimensionRatio="1:1"
54 motion:layout_constraintHorizontal_bias="0.5"
55 motion:layout_constraintStart_toStartOf="@id/guideline_start"
56 motion:layout_constraintEnd_toEndOf="@id/guideline_end"
57 motion:layout_constraintTop_toTopOf="parent"
58 motion:layout_constraintBottom_toBottomOf="parent"
George Lin542b77b2023-01-25 14:33:24 +000059 android:layout_marginStart="@dimen/clock_carousel_item_margin"
60 android:layout_marginEnd="@dimen/clock_carousel_item_margin" />
George Lin8d3ba602023-01-16 06:58:07 +000061 <Constraint
62 android:id="@+id/item_view_2"
George Lin542b77b2023-01-25 14:33:24 +000063 android:layout_width="@dimen/clock_carousel_item_small_size"
64 android:layout_height="@dimen/clock_carousel_item_small_size"
George Lin8d3ba602023-01-16 06:58:07 +000065 motion:layout_constraintStart_toStartOf="@id/guideline_end"
66 motion:layout_constraintTop_toTopOf="parent"
67 motion:layout_constraintBottom_toBottomOf="parent"
68 android:layout_marginStart="16dp" />
69 </ConstraintSet>
70
71 <ConstraintSet android:id="@+id/start">
72 <Constraint
73 android:id="@+id/item_view_1"
George Lin542b77b2023-01-25 14:33:24 +000074 android:layout_width="@dimen/clock_carousel_item_small_size"
75 android:layout_height="@dimen/clock_carousel_item_small_size"
George Lin8d3ba602023-01-16 06:58:07 +000076 motion:layout_constraintEnd_toStartOf="@id/guideline_start"
77 motion:layout_constraintTop_toTopOf="parent"
78 motion:layout_constraintBottom_toBottomOf="parent"
79 android:layout_marginEnd="16dp" />
80 <Constraint
81 android:id="@+id/item_view_2"
82 android:layout_width="0dp"
83 android:layout_height="0dp"
84 motion:layout_constraintDimensionRatio="1:1"
85 motion:layout_constraintHorizontal_bias="0.5"
86 motion:layout_constraintStart_toStartOf="@id/guideline_start"
87 motion:layout_constraintEnd_toEndOf="@id/guideline_end"
88 motion:layout_constraintTop_toTopOf="parent"
89 motion:layout_constraintBottom_toBottomOf="parent"
George Lin542b77b2023-01-25 14:33:24 +000090 android:layout_marginStart="@dimen/clock_carousel_item_margin"
91 android:layout_marginEnd="@dimen/clock_carousel_item_margin" />
George Lin8d3ba602023-01-16 06:58:07 +000092 <Constraint
93 android:id="@+id/item_view_3"
George Lin542b77b2023-01-25 14:33:24 +000094 android:layout_width="@dimen/clock_carousel_item_small_size"
95 android:layout_height="@dimen/clock_carousel_item_small_size"
George Lin8d3ba602023-01-16 06:58:07 +000096 motion:layout_constraintStart_toStartOf="@id/guideline_end"
97 motion:layout_constraintTop_toTopOf="parent"
98 motion:layout_constraintBottom_toBottomOf="parent"
99 android:layout_marginStart="16dp" />
100 </ConstraintSet>
101
102 <ConstraintSet android:id="@+id/next">
103 <Constraint
104 android:id="@+id/item_view_2"
George Lin542b77b2023-01-25 14:33:24 +0000105 android:layout_width="@dimen/clock_carousel_item_small_size"
106 android:layout_height="@dimen/clock_carousel_item_small_size"
George Lin8d3ba602023-01-16 06:58:07 +0000107 motion:layout_constraintEnd_toStartOf="@id/guideline_start"
108 motion:layout_constraintTop_toTopOf="parent"
109 motion:layout_constraintBottom_toBottomOf="parent"
110 android:layout_marginEnd="16dp" />
111 <Constraint
112 android:id="@+id/item_view_3"
113 android:layout_width="0dp"
114 android:layout_height="0dp"
115 motion:layout_constraintDimensionRatio="1:1"
116 motion:layout_constraintHorizontal_bias="0.5"
117 motion:layout_constraintStart_toStartOf="@id/guideline_start"
118 motion:layout_constraintEnd_toEndOf="@id/guideline_end"
119 motion:layout_constraintTop_toTopOf="parent"
120 motion:layout_constraintBottom_toBottomOf="parent"
George Lin542b77b2023-01-25 14:33:24 +0000121 android:layout_marginStart="@dimen/clock_carousel_item_margin"
122 android:layout_marginEnd="@dimen/clock_carousel_item_margin" />
George Lin8d3ba602023-01-16 06:58:07 +0000123 <Constraint
124 android:id="@+id/item_view_4"
George Lin542b77b2023-01-25 14:33:24 +0000125 android:layout_width="@dimen/clock_carousel_item_small_size"
126 android:layout_height="@dimen/clock_carousel_item_small_size"
George Lin8d3ba602023-01-16 06:58:07 +0000127 motion:layout_constraintStart_toStartOf="@id/guideline_end"
128 motion:layout_constraintTop_toTopOf="parent"
129 motion:layout_constraintBottom_toBottomOf="parent"
130 android:layout_marginStart="16dp" />
131 </ConstraintSet>
132
133</MotionScene>