George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 1 | <?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 Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 43 | android:layout_width="@dimen/clock_carousel_item_width" |
| 44 | android:layout_height="@dimen/clock_carousel_item_height" |
George Lin | 1a2ff99 | 2023-02-18 04:34:35 +0000 | [diff] [blame] | 45 | android:scaleX="0.5" |
| 46 | android:scaleY="0.5" |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 47 | motion:layout_constraintEnd_toStartOf="@id/guideline_start" |
| 48 | motion:layout_constraintTop_toTopOf="parent" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 49 | motion:layout_constraintBottom_toBottomOf="parent" /> |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 50 | <Constraint |
| 51 | android:id="@+id/item_view_1" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 52 | android:layout_width="@dimen/clock_carousel_item_width" |
| 53 | android:layout_height="@dimen/clock_carousel_item_height" |
| 54 | motion:layout_constraintWidth_max="@dimen/clock_carousel_item_width" |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 55 | motion:layout_constraintHorizontal_bias="0.5" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 56 | motion:layout_constraintStart_toStartOf="parent" |
| 57 | motion:layout_constraintEnd_toEndOf="parent" |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 58 | motion:layout_constraintTop_toTopOf="parent" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 59 | motion:layout_constraintBottom_toBottomOf="parent" /> |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 60 | <Constraint |
| 61 | android:id="@+id/item_view_2" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 62 | android:layout_width="@dimen/clock_carousel_item_width" |
| 63 | android:layout_height="@dimen/clock_carousel_item_height" |
George Lin | 1a2ff99 | 2023-02-18 04:34:35 +0000 | [diff] [blame] | 64 | android:scaleX="0.5" |
| 65 | android:scaleY="0.5" |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 66 | motion:layout_constraintStart_toStartOf="@id/guideline_end" |
| 67 | motion:layout_constraintTop_toTopOf="parent" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 68 | motion:layout_constraintBottom_toBottomOf="parent" /> |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 69 | </ConstraintSet> |
| 70 | |
| 71 | <ConstraintSet android:id="@+id/start"> |
| 72 | <Constraint |
| 73 | android:id="@+id/item_view_1" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 74 | android:layout_width="@dimen/clock_carousel_item_width" |
| 75 | android:layout_height="@dimen/clock_carousel_item_height" |
George Lin | 1a2ff99 | 2023-02-18 04:34:35 +0000 | [diff] [blame] | 76 | android:scaleX="0.5" |
| 77 | android:scaleY="0.5" |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 78 | motion:layout_constraintEnd_toStartOf="@id/guideline_start" |
| 79 | motion:layout_constraintTop_toTopOf="parent" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 80 | motion:layout_constraintBottom_toBottomOf="parent" /> |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 81 | <Constraint |
| 82 | android:id="@+id/item_view_2" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 83 | android:layout_width="@dimen/clock_carousel_item_width" |
| 84 | android:layout_height="@dimen/clock_carousel_item_height" |
| 85 | motion:layout_constraintWidth_max="@dimen/clock_carousel_item_width" |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 86 | motion:layout_constraintHorizontal_bias="0.5" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 87 | motion:layout_constraintStart_toStartOf="parent" |
| 88 | motion:layout_constraintEnd_toEndOf="parent" |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 89 | motion:layout_constraintTop_toTopOf="parent" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 90 | motion:layout_constraintBottom_toBottomOf="parent" /> |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 91 | <Constraint |
| 92 | android:id="@+id/item_view_3" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 93 | android:layout_width="@dimen/clock_carousel_item_width" |
| 94 | android:layout_height="@dimen/clock_carousel_item_height" |
George Lin | 1a2ff99 | 2023-02-18 04:34:35 +0000 | [diff] [blame] | 95 | android:scaleX="0.5" |
| 96 | android:scaleY="0.5" |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 97 | motion:layout_constraintStart_toStartOf="@id/guideline_end" |
| 98 | motion:layout_constraintTop_toTopOf="parent" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 99 | motion:layout_constraintBottom_toBottomOf="parent" /> |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 100 | </ConstraintSet> |
| 101 | |
| 102 | <ConstraintSet android:id="@+id/next"> |
| 103 | <Constraint |
| 104 | android:id="@+id/item_view_2" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 105 | android:layout_width="@dimen/clock_carousel_item_width" |
| 106 | android:layout_height="@dimen/clock_carousel_item_height" |
George Lin | 1a2ff99 | 2023-02-18 04:34:35 +0000 | [diff] [blame] | 107 | android:scaleX="0.5" |
| 108 | android:scaleY="0.5" |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 109 | motion:layout_constraintEnd_toStartOf="@id/guideline_start" |
| 110 | motion:layout_constraintTop_toTopOf="parent" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 111 | motion:layout_constraintBottom_toBottomOf="parent" /> |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 112 | <Constraint |
| 113 | android:id="@+id/item_view_3" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 114 | android:layout_width="@dimen/clock_carousel_item_width" |
| 115 | android:layout_height="@dimen/clock_carousel_item_height" |
| 116 | motion:layout_constraintWidth_max="@dimen/clock_carousel_item_width" |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 117 | motion:layout_constraintHorizontal_bias="0.5" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 118 | motion:layout_constraintStart_toStartOf="parent" |
| 119 | motion:layout_constraintEnd_toEndOf="parent" |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 120 | motion:layout_constraintTop_toTopOf="parent" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 121 | motion:layout_constraintBottom_toBottomOf="parent" /> |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 122 | <Constraint |
| 123 | android:id="@+id/item_view_4" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 124 | android:layout_width="@dimen/clock_carousel_item_width" |
| 125 | android:layout_height="@dimen/clock_carousel_item_height" |
George Lin | 1a2ff99 | 2023-02-18 04:34:35 +0000 | [diff] [blame] | 126 | android:scaleX="0.5" |
| 127 | android:scaleY="0.5" |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 128 | motion:layout_constraintStart_toStartOf="@id/guideline_end" |
| 129 | motion:layout_constraintTop_toTopOf="parent" |
George Lin | cfc7497 | 2023-02-14 21:53:04 +0000 | [diff] [blame] | 130 | motion:layout_constraintBottom_toBottomOf="parent" /> |
George Lin | 8d3ba60 | 2023-01-16 06:58:07 +0000 | [diff] [blame] | 131 | </ConstraintSet> |
| 132 | |
| 133 | </MotionScene> |