<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (C) 2024 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:app="http://schemas.android.com/apk/res-auto">

    <Transition
        app:constraintSetStart="@id/lock_preview_selected"
        app:constraintSetEnd="@id/home_preview_selected"
        app:duration="200">
        <OnSwipe
            app:dragDirection="dragStart"
            app:maxAcceleration="50"/>
    </Transition>

    <ConstraintSet android:id="@+id/lock_preview_selected">
        <Constraint
            android:id="@+id/apply_wallpaper_header"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:visibility="gone"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <Constraint
            android:id="@+id/lock_preview"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="@+id/guideline_center"
            app:layout_constraintEnd_toEndOf="@+id/guideline_center" />

        <Constraint
            android:id="@+id/lock_checkbox"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="gone"
            app:layout_constraintStart_toStartOf="@+id/lock_preview"
            app:layout_constraintEnd_toEndOf="@+id/lock_preview"
            app:layout_constraintBottom_toTopOf="@+id/apply_button" />

        <Constraint
            android:id="@+id/home_preview"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/handheld_small_preview_space_between_preview"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toEndOf="@+id/lock_preview" />

        <Constraint
            android:id="@+id/home_checkbox"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="gone"
            app:layout_constraintStart_toStartOf="@+id/home_preview"
            app:layout_constraintEnd_toEndOf="@+id/home_preview"
            app:layout_constraintBottom_toTopOf="@+id/apply_button" />

        <Constraint
            android:id="@+id/apply_button"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:visibility="gone"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintBottom_toTopOf="@+id/cancel_button" />

        <Constraint
            android:id="@+id/cancel_button"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:visibility="gone"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintBottom_toBottomOf="parent" />
    </ConstraintSet>

    <ConstraintSet android:id="@+id/home_preview_selected">
        <Constraint
            android:id="@+id/apply_wallpaper_header"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:visibility="gone"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <Constraint
            android:id="@+id/lock_preview"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="@dimen/handheld_small_preview_space_between_preview"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/home_preview" />

        <Constraint
            android:id="@+id/lock_checkbox"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="gone"
            app:layout_constraintStart_toStartOf="@+id/lock_preview"
            app:layout_constraintEnd_toEndOf="@+id/lock_preview"
            app:layout_constraintBottom_toTopOf="@+id/apply_button" />

        <Constraint
            android:id="@+id/home_preview"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="@+id/guideline_center"
            app:layout_constraintEnd_toEndOf="@+id/guideline_center" />

        <Constraint
            android:id="@+id/home_checkbox"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="gone"
            app:layout_constraintStart_toStartOf="@+id/home_preview"
            app:layout_constraintEnd_toEndOf="@+id/home_preview"
            app:layout_constraintBottom_toTopOf="@+id/apply_button" />

        <Constraint
            android:id="@+id/apply_button"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:visibility="gone"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintBottom_toTopOf="@+id/cancel_button" />

        <Constraint
            android:id="@+id/cancel_button"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:visibility="gone"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintBottom_toBottomOf="parent" />
    </ConstraintSet>

    <ConstraintSet android:id="@+id/apply_wallpaper_preview_only">
        <Constraint
            android:id="@+id/apply_wallpaper_header"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/handheld_apply_wallpaper_screen_margin_horizontal"
            android:layout_marginEnd="@dimen/handheld_apply_wallpaper_screen_margin_horizontal"
            android:layout_marginTop="@dimen/handheld_apply_wallpaper_screen_header_margin_vertical"
            android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_header_margin_vertical"
            android:alpha="0"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <Constraint
            android:id="@+id/lock_preview"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_button_space"
            android:layout_marginEnd="@dimen/handheld_small_preview_space_between_preview"
            android:layout_marginStart="@dimen/handheld_small_preview_pager_margin_start"
            app:layout_constraintBottom_toTopOf="@+id/lock_checkbox"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/home_preview" />

        <Constraint
            android:id="@+id/lock_checkbox"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/handheld_apply_wallpaper_preview_button_margin_bottom"
            android:alpha="0"
            app:layout_constraintStart_toStartOf="@+id/lock_preview"
            app:layout_constraintEnd_toEndOf="@+id/lock_preview"
            app:layout_constraintBottom_toTopOf="@+id/apply_button" />

        <Constraint
            android:id="@+id/home_preview"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_button_space"
            android:layout_marginEnd="@dimen/handheld_small_preview_pager_margin_end"
            app:layout_constraintBottom_toTopOf="@+id/home_checkbox"
            app:layout_constraintStart_toEndOf="@+id/lock_preview"
            app:layout_constraintEnd_toEndOf="parent" />

        <Constraint
            android:id="@+id/home_checkbox"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/handheld_apply_wallpaper_preview_button_margin_bottom"
            android:alpha="0"
            app:layout_constraintStart_toStartOf="@+id/home_preview"
            app:layout_constraintEnd_toEndOf="@+id/home_preview"
            app:layout_constraintBottom_toTopOf="@+id/apply_button" />

        <Constraint
            android:id="@+id/apply_button"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/handheld_apply_wallpaper_screen_margin_horizontal"
            android:layout_marginEnd="@dimen/handheld_apply_wallpaper_screen_margin_horizontal"
            android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_button_space"
            android:alpha="0"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintBottom_toTopOf="@+id/cancel_button" />

        <Constraint
            android:id="@+id/cancel_button"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/handheld_apply_wallpaper_screen_margin_horizontal"
            android:layout_marginEnd="@dimen/handheld_apply_wallpaper_screen_margin_horizontal"
            android:alpha="0"
            android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_margin_bottom"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintBottom_toBottomOf="parent" />
    </ConstraintSet>

    <ConstraintSet android:id="@+id/apply_wallpaper_all">
        <Constraint
            android:id="@+id/apply_wallpaper_header"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/handheld_apply_wallpaper_screen_margin_horizontal"
            android:layout_marginEnd="@dimen/handheld_apply_wallpaper_screen_margin_horizontal"
            android:layout_marginTop="@dimen/handheld_apply_wallpaper_screen_header_margin_vertical"
            android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_header_margin_vertical"
            android:alpha="1"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintBottom_toTopOf="@+id/lock_preview"
            app:layout_constraintTop_toTopOf="parent" />

        <Constraint
            android:id="@+id/lock_preview"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_button_space"
            android:layout_marginEnd="@dimen/handheld_small_preview_space_between_preview"
            android:layout_marginStart="@dimen/handheld_small_preview_pager_margin_start"
            app:layout_constraintBottom_toTopOf="@+id/lock_checkbox"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/home_preview" />

        <Constraint
            android:id="@+id/lock_checkbox"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/handheld_apply_wallpaper_preview_button_margin_bottom"
            android:alpha="1"
            app:layout_constraintStart_toStartOf="@+id/lock_preview"
            app:layout_constraintEnd_toEndOf="@+id/lock_preview"
            app:layout_constraintBottom_toTopOf="@+id/apply_button" />

        <Constraint
            android:id="@+id/home_preview"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_button_space"
            android:layout_marginEnd="@dimen/handheld_small_preview_pager_margin_end"
            app:layout_constraintBottom_toTopOf="@+id/home_checkbox"
            app:layout_constraintStart_toEndOf="@+id/lock_preview"
            app:layout_constraintEnd_toEndOf="parent" />

        <Constraint
            android:id="@+id/home_checkbox"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/handheld_apply_wallpaper_preview_button_margin_bottom"
            android:alpha="1"
            app:layout_constraintStart_toStartOf="@+id/home_preview"
            app:layout_constraintEnd_toEndOf="@+id/home_preview"
            app:layout_constraintBottom_toTopOf="@+id/apply_button" />

        <Constraint
            android:id="@+id/apply_button"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/handheld_apply_wallpaper_screen_margin_horizontal"
            android:layout_marginEnd="@dimen/handheld_apply_wallpaper_screen_margin_horizontal"
            android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_button_space"
            android:alpha="1"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintBottom_toTopOf="@+id/cancel_button" />

        <Constraint
            android:id="@+id/cancel_button"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/handheld_apply_wallpaper_screen_margin_horizontal"
            android:layout_marginEnd="@dimen/handheld_apply_wallpaper_screen_margin_horizontal"
            android:alpha="1"
            android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_margin_bottom"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintBottom_toBottomOf="parent" />
    </ConstraintSet>
</MotionScene>