1<?xml version="1.0" encoding="utf-8"?><!--
2  ~ Copyright (C) 2024 The Android Open Source Project
3  ~
4  ~ Licensed under the Apache License, Version 2.0 (the "License");
5  ~ you may not use this file except in compliance with the License.
6  ~ You may obtain a copy of the License at
7  ~
8  ~      http://www.apache.org/licenses/LICENSE-2.0
9  ~
10  ~ Unless required by applicable law or agreed to in writing, software
11  ~ distributed under the License is distributed on an "AS IS" BASIS,
12  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  ~ See the License for the specific language governing permissions and
14  ~ limitations under the License.
15  -->
16
17<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
18    xmlns:app="http://schemas.android.com/apk/res-auto">
19
20    <Transition
21        app:constraintSetStart="@id/primary_tab_selected"
22        app:constraintSetEnd="@id/secondary_tab_selected"
23        app:duration="200">
24        <OnSwipe
25            app:maxAcceleration="50"
26            app:dragDirection="dragEnd"
27            app:touchAnchorId="@+id/primary_tab"
28            app:touchAnchorSide="end" />
29    </Transition>
30
31    <ConstraintSet android:id="@+id/primary_tab_selected">
32        <Constraint
33            android:id="@+id/primary_tab"
34            android:layout_width="wrap_content"
35            android:layout_height="wrap_content"
36            app:layout_constraintTop_toTopOf="parent"
37            app:layout_constraintBottom_toBottomOf="parent"
38            app:layout_constraintStart_toStartOf="@+id/guideline_center"
39            app:layout_constraintEnd_toEndOf="@+id/guideline_center" />
40
41        <Constraint
42            android:id="@+id/secondary_tab"
43            android:layout_width="wrap_content"
44            android:layout_height="wrap_content"
45            app:layout_constraintTop_toTopOf="parent"
46            app:layout_constraintBottom_toBottomOf="parent"
47            app:layout_constraintStart_toEndOf="@+id/primary_tab"
48            android:layout_marginStart="8dp" />
49    </ConstraintSet>
50
51    <ConstraintSet android:id="@+id/secondary_tab_selected">
52        <Constraint
53            android:id="@+id/primary_tab"
54            android:layout_width="wrap_content"
55            android:layout_height="wrap_content"
56            app:layout_constraintTop_toTopOf="parent"
57            app:layout_constraintBottom_toBottomOf="parent"
58            app:layout_constraintEnd_toStartOf="@+id/secondary_tab"
59            android:layout_marginEnd="8dp" />
60
61        <Constraint
62            android:id="@+id/secondary_tab"
63            android:layout_width="wrap_content"
64            android:layout_height="wrap_content"
65            app:layout_constraintTop_toTopOf="parent"
66            app:layout_constraintBottom_toBottomOf="parent"
67            app:layout_constraintStart_toStartOf="@+id/guideline_center"
68            app:layout_constraintEnd_toEndOf="@+id/guideline_center" />
69    </ConstraintSet>
70</MotionScene>