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/lock_preview_selected" 22 app:constraintSetEnd="@id/home_preview_selected" 23 app:duration="200"> 24 <OnSwipe 25 app:dragDirection="dragStart" 26 app:maxAcceleration="50"/> 27 </Transition> 28 29 <ConstraintSet android:id="@+id/lock_preview_selected"> 30 <Constraint 31 android:id="@+id/apply_wallpaper_header" 32 android:layout_width="0dp" 33 android:layout_height="wrap_content" 34 android:visibility="gone" 35 app:layout_constraintStart_toStartOf="parent" 36 app:layout_constraintEnd_toEndOf="parent" 37 app:layout_constraintTop_toTopOf="parent" /> 38 39 <Constraint 40 android:id="@+id/lock_preview" 41 android:layout_width="wrap_content" 42 android:layout_height="wrap_content" 43 app:layout_constraintTop_toTopOf="parent" 44 app:layout_constraintBottom_toBottomOf="parent" 45 app:layout_constraintStart_toStartOf="@+id/guideline_center" 46 app:layout_constraintEnd_toEndOf="@+id/guideline_center" /> 47 48 <Constraint 49 android:id="@+id/lock_checkbox" 50 android:layout_width="wrap_content" 51 android:layout_height="wrap_content" 52 android:visibility="gone" 53 app:layout_constraintStart_toStartOf="@+id/lock_preview" 54 app:layout_constraintEnd_toEndOf="@+id/lock_preview" 55 app:layout_constraintBottom_toTopOf="@+id/apply_button" /> 56 57 <Constraint 58 android:id="@+id/home_preview" 59 android:layout_width="wrap_content" 60 android:layout_height="wrap_content" 61 android:layout_marginStart="@dimen/handheld_small_preview_space_between_preview" 62 app:layout_constraintTop_toTopOf="parent" 63 app:layout_constraintBottom_toBottomOf="parent" 64 app:layout_constraintStart_toEndOf="@+id/lock_preview" /> 65 66 <Constraint 67 android:id="@+id/home_checkbox" 68 android:layout_width="wrap_content" 69 android:layout_height="wrap_content" 70 android:visibility="gone" 71 app:layout_constraintStart_toStartOf="@+id/home_preview" 72 app:layout_constraintEnd_toEndOf="@+id/home_preview" 73 app:layout_constraintBottom_toTopOf="@+id/apply_button" /> 74 75 <Constraint 76 android:id="@+id/apply_button" 77 android:layout_width="0dp" 78 android:layout_height="wrap_content" 79 android:visibility="gone" 80 app:layout_constraintStart_toStartOf="parent" 81 app:layout_constraintEnd_toEndOf="parent" 82 app:layout_constraintBottom_toTopOf="@+id/cancel_button" /> 83 84 <Constraint 85 android:id="@+id/cancel_button" 86 android:layout_width="0dp" 87 android:layout_height="wrap_content" 88 android:visibility="gone" 89 app:layout_constraintStart_toStartOf="parent" 90 app:layout_constraintEnd_toEndOf="parent" 91 app:layout_constraintBottom_toBottomOf="parent" /> 92 </ConstraintSet> 93 94 <ConstraintSet android:id="@+id/home_preview_selected"> 95 <Constraint 96 android:id="@+id/apply_wallpaper_header" 97 android:layout_width="0dp" 98 android:layout_height="wrap_content" 99 android:visibility="gone" 100 app:layout_constraintStart_toStartOf="parent" 101 app:layout_constraintEnd_toEndOf="parent" 102 app:layout_constraintTop_toTopOf="parent" /> 103 104 <Constraint 105 android:id="@+id/lock_preview" 106 android:layout_width="wrap_content" 107 android:layout_height="wrap_content" 108 android:layout_marginEnd="@dimen/handheld_small_preview_space_between_preview" 109 app:layout_constraintTop_toTopOf="parent" 110 app:layout_constraintBottom_toBottomOf="parent" 111 app:layout_constraintEnd_toStartOf="@+id/home_preview" /> 112 113 <Constraint 114 android:id="@+id/lock_checkbox" 115 android:layout_width="wrap_content" 116 android:layout_height="wrap_content" 117 android:visibility="gone" 118 app:layout_constraintStart_toStartOf="@+id/lock_preview" 119 app:layout_constraintEnd_toEndOf="@+id/lock_preview" 120 app:layout_constraintBottom_toTopOf="@+id/apply_button" /> 121 122 <Constraint 123 android:id="@+id/home_preview" 124 android:layout_width="wrap_content" 125 android:layout_height="wrap_content" 126 app:layout_constraintTop_toTopOf="parent" 127 app:layout_constraintBottom_toBottomOf="parent" 128 app:layout_constraintStart_toStartOf="@+id/guideline_center" 129 app:layout_constraintEnd_toEndOf="@+id/guideline_center" /> 130 131 <Constraint 132 android:id="@+id/home_checkbox" 133 android:layout_width="wrap_content" 134 android:layout_height="wrap_content" 135 android:visibility="gone" 136 app:layout_constraintStart_toStartOf="@+id/home_preview" 137 app:layout_constraintEnd_toEndOf="@+id/home_preview" 138 app:layout_constraintBottom_toTopOf="@+id/apply_button" /> 139 140 <Constraint 141 android:id="@+id/apply_button" 142 android:layout_width="0dp" 143 android:layout_height="wrap_content" 144 android:visibility="gone" 145 app:layout_constraintStart_toStartOf="parent" 146 app:layout_constraintEnd_toEndOf="parent" 147 app:layout_constraintBottom_toTopOf="@+id/cancel_button" /> 148 149 <Constraint 150 android:id="@+id/cancel_button" 151 android:layout_width="0dp" 152 android:layout_height="wrap_content" 153 android:visibility="gone" 154 app:layout_constraintStart_toStartOf="parent" 155 app:layout_constraintEnd_toEndOf="parent" 156 app:layout_constraintBottom_toBottomOf="parent" /> 157 </ConstraintSet> 158 159 <ConstraintSet android:id="@+id/apply_wallpaper_preview_only"> 160 <Constraint 161 android:id="@+id/apply_wallpaper_header" 162 android:layout_width="0dp" 163 android:layout_height="wrap_content" 164 android:layout_marginStart="@dimen/handheld_apply_wallpaper_screen_margin_horizontal" 165 android:layout_marginEnd="@dimen/handheld_apply_wallpaper_screen_margin_horizontal" 166 android:layout_marginTop="@dimen/handheld_apply_wallpaper_screen_header_margin_vertical" 167 android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_header_margin_vertical" 168 android:alpha="0" 169 app:layout_constraintStart_toStartOf="parent" 170 app:layout_constraintEnd_toEndOf="parent" 171 app:layout_constraintTop_toTopOf="parent" /> 172 173 <Constraint 174 android:id="@+id/lock_preview" 175 android:layout_width="0dp" 176 android:layout_height="wrap_content" 177 android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_button_space" 178 android:layout_marginEnd="@dimen/handheld_small_preview_space_between_preview" 179 android:layout_marginStart="@dimen/handheld_small_preview_pager_margin_start" 180 app:layout_constraintBottom_toTopOf="@+id/lock_checkbox" 181 app:layout_constraintStart_toStartOf="parent" 182 app:layout_constraintEnd_toStartOf="@+id/home_preview" /> 183 184 <Constraint 185 android:id="@+id/lock_checkbox" 186 android:layout_width="wrap_content" 187 android:layout_height="wrap_content" 188 android:layout_marginBottom="@dimen/handheld_apply_wallpaper_preview_button_margin_bottom" 189 android:alpha="0" 190 app:layout_constraintStart_toStartOf="@+id/lock_preview" 191 app:layout_constraintEnd_toEndOf="@+id/lock_preview" 192 app:layout_constraintBottom_toTopOf="@+id/apply_button" /> 193 194 <Constraint 195 android:id="@+id/home_preview" 196 android:layout_width="0dp" 197 android:layout_height="wrap_content" 198 android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_button_space" 199 android:layout_marginEnd="@dimen/handheld_small_preview_pager_margin_end" 200 app:layout_constraintBottom_toTopOf="@+id/home_checkbox" 201 app:layout_constraintStart_toEndOf="@+id/lock_preview" 202 app:layout_constraintEnd_toEndOf="parent" /> 203 204 <Constraint 205 android:id="@+id/home_checkbox" 206 android:layout_width="wrap_content" 207 android:layout_height="wrap_content" 208 android:layout_marginBottom="@dimen/handheld_apply_wallpaper_preview_button_margin_bottom" 209 android:alpha="0" 210 app:layout_constraintStart_toStartOf="@+id/home_preview" 211 app:layout_constraintEnd_toEndOf="@+id/home_preview" 212 app:layout_constraintBottom_toTopOf="@+id/apply_button" /> 213 214 <Constraint 215 android:id="@+id/apply_button" 216 android:layout_width="0dp" 217 android:layout_height="wrap_content" 218 android:layout_marginStart="@dimen/handheld_apply_wallpaper_screen_margin_horizontal" 219 android:layout_marginEnd="@dimen/handheld_apply_wallpaper_screen_margin_horizontal" 220 android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_button_space" 221 android:alpha="0" 222 app:layout_constraintStart_toStartOf="parent" 223 app:layout_constraintEnd_toEndOf="parent" 224 app:layout_constraintBottom_toTopOf="@+id/cancel_button" /> 225 226 <Constraint 227 android:id="@+id/cancel_button" 228 android:layout_width="0dp" 229 android:layout_height="wrap_content" 230 android:layout_marginStart="@dimen/handheld_apply_wallpaper_screen_margin_horizontal" 231 android:layout_marginEnd="@dimen/handheld_apply_wallpaper_screen_margin_horizontal" 232 android:alpha="0" 233 android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_margin_bottom" 234 app:layout_constraintStart_toStartOf="parent" 235 app:layout_constraintEnd_toEndOf="parent" 236 app:layout_constraintBottom_toBottomOf="parent" /> 237 </ConstraintSet> 238 239 <ConstraintSet android:id="@+id/apply_wallpaper_all"> 240 <Constraint 241 android:id="@+id/apply_wallpaper_header" 242 android:layout_width="0dp" 243 android:layout_height="wrap_content" 244 android:layout_marginStart="@dimen/handheld_apply_wallpaper_screen_margin_horizontal" 245 android:layout_marginEnd="@dimen/handheld_apply_wallpaper_screen_margin_horizontal" 246 android:layout_marginTop="@dimen/handheld_apply_wallpaper_screen_header_margin_vertical" 247 android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_header_margin_vertical" 248 android:alpha="1" 249 app:layout_constraintStart_toStartOf="parent" 250 app:layout_constraintEnd_toEndOf="parent" 251 app:layout_constraintTop_toTopOf="parent" /> 252 253 <Constraint 254 android:id="@+id/lock_preview" 255 android:layout_width="0dp" 256 android:layout_height="wrap_content" 257 android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_button_space" 258 android:layout_marginEnd="@dimen/handheld_small_preview_space_between_preview" 259 android:layout_marginStart="@dimen/handheld_small_preview_pager_margin_start" 260 app:layout_constraintBottom_toTopOf="@+id/lock_checkbox" 261 app:layout_constraintStart_toStartOf="parent" 262 app:layout_constraintEnd_toStartOf="@+id/home_preview" /> 263 264 <Constraint 265 android:id="@+id/lock_checkbox" 266 android:layout_width="wrap_content" 267 android:layout_height="wrap_content" 268 android:layout_marginBottom="@dimen/handheld_apply_wallpaper_preview_button_margin_bottom" 269 android:alpha="1" 270 app:layout_constraintStart_toStartOf="@+id/lock_preview" 271 app:layout_constraintEnd_toEndOf="@+id/lock_preview" 272 app:layout_constraintBottom_toTopOf="@+id/apply_button" /> 273 274 <Constraint 275 android:id="@+id/home_preview" 276 android:layout_width="0dp" 277 android:layout_height="wrap_content" 278 android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_button_space" 279 android:layout_marginEnd="@dimen/handheld_small_preview_pager_margin_end" 280 app:layout_constraintBottom_toTopOf="@+id/home_checkbox" 281 app:layout_constraintStart_toEndOf="@+id/lock_preview" 282 app:layout_constraintEnd_toEndOf="parent" /> 283 284 <Constraint 285 android:id="@+id/home_checkbox" 286 android:layout_width="wrap_content" 287 android:layout_height="wrap_content" 288 android:layout_marginBottom="@dimen/handheld_apply_wallpaper_preview_button_margin_bottom" 289 android:alpha="1" 290 app:layout_constraintStart_toStartOf="@+id/home_preview" 291 app:layout_constraintEnd_toEndOf="@+id/home_preview" 292 app:layout_constraintBottom_toTopOf="@+id/apply_button" /> 293 294 <Constraint 295 android:id="@+id/apply_button" 296 android:layout_width="0dp" 297 android:layout_height="wrap_content" 298 android:layout_marginStart="@dimen/handheld_apply_wallpaper_screen_margin_horizontal" 299 android:layout_marginEnd="@dimen/handheld_apply_wallpaper_screen_margin_horizontal" 300 android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_button_space" 301 android:alpha="1" 302 app:layout_constraintStart_toStartOf="parent" 303 app:layout_constraintEnd_toEndOf="parent" 304 app:layout_constraintBottom_toTopOf="@+id/cancel_button" /> 305 306 <Constraint 307 android:id="@+id/cancel_button" 308 android:layout_width="0dp" 309 android:layout_height="wrap_content" 310 android:layout_marginStart="@dimen/handheld_apply_wallpaper_screen_margin_horizontal" 311 android:layout_marginEnd="@dimen/handheld_apply_wallpaper_screen_margin_horizontal" 312 android:alpha="1" 313 android:layout_marginBottom="@dimen/handheld_apply_wallpaper_screen_margin_bottom" 314 app:layout_constraintStart_toStartOf="parent" 315 app:layout_constraintEnd_toEndOf="parent" 316 app:layout_constraintBottom_toBottomOf="parent" /> 317 </ConstraintSet> 318</MotionScene>