1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2021 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 18<MotionScene xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:motion="http://schemas.android.com/apk/res-auto"> 20 <Transition 21 android:id="@+id/micOffFromInvisible" 22 motion:constraintSetStart="@id/invisible" 23 motion:constraintSetEnd="@id/mic_off" 24 motion:motionInterpolator="decelerate" 25 motion:duration="@integer/privacy_chip_animation_transition_duration"/> 26 27 <Transition 28 android:id="@+id/activeInitFromInvisible" 29 motion:constraintSetStart="@id/invisible" 30 motion:constraintSetEnd="@id/active_init" 31 motion:motionInterpolator="decelerate" 32 motion:duration="@integer/privacy_chip_animation_transition_duration"/> 33 34 <Transition 35 android:id="@+id/micOffFromActiveInit" 36 motion:constraintSetStart="@id/active_init" 37 motion:constraintSetEnd="@id/mic_off" 38 motion:motionInterpolator="decelerate" 39 motion:duration="@integer/privacy_chip_animation_transition_duration"/> 40 41 <Transition 42 android:id="@+id/activeInitFromInactive" 43 motion:constraintSetStart="@id/inactive" 44 motion:constraintSetEnd="@id/active_init" 45 motion:motionInterpolator="decelerate" 46 motion:duration="@integer/privacy_chip_animation_transition_duration"/> 47 48 <Transition 49 android:id="@+id/activeFromActiveInit" 50 motion:constraintSetStart="@id/active_init" 51 motion:constraintSetEnd="@id/active" 52 motion:motionInterpolator="decelerate" 53 motion:duration="@integer/privacy_chip_animation_transition_duration"/> 54 55 <Transition 56 android:id="@+id/micOffFromActive" 57 motion:constraintSetStart="@id/active" 58 motion:constraintSetEnd="@id/mic_off" 59 motion:motionInterpolator="decelerate" 60 motion:duration="@integer/privacy_chip_animation_transition_duration"/> 61 62 <Transition 63 android:id="@+id/invisibleFromInactive" 64 motion:constraintSetStart="@id/inactive" 65 motion:constraintSetEnd="@id/invisible" 66 motion:motionInterpolator="decelerate" 67 motion:duration="@integer/privacy_chip_animation_transition_duration" /> 68 69 <Transition 70 android:id="@+id/micOffFromInactive" 71 motion:constraintSetStart="@id/inactive" 72 motion:constraintSetEnd="@id/mic_off" 73 motion:motionInterpolator="decelerate" 74 motion:duration="@integer/privacy_chip_animation_transition_duration"/> 75 76 <Transition 77 android:id="@+id/invisibleFromMicOff" 78 motion:constraintSetStart="@id/mic_off" 79 motion:constraintSetEnd="@id/invisible" 80 motion:motionInterpolator="decelerate" 81 motion:duration="@integer/privacy_chip_animation_transition_duration" /> 82 83 <Transition 84 android:id="@+id/inactiveFromActive" 85 motion:constraintSetStart="@id/active" 86 motion:constraintSetEnd="@id/inactive" 87 motion:motionInterpolator="decelerate" 88 motion:duration="@integer/privacy_chip_animation_transition_duration" /> 89 90 <Transition 91 android:id="@+id/activeInitFromMicOff" 92 motion:constraintSetStart="@id/mic_off" 93 motion:constraintSetEnd="@id/active_init" 94 motion:motionInterpolator="decelerate" 95 motion:duration="@integer/privacy_chip_animation_transition_duration" /> 96 97 <Transition 98 android:id="@+id/inactiveFromActiveInit" 99 motion:constraintSetStart="@id/active_init" 100 motion:constraintSetEnd="@id/inactive" 101 motion:motionInterpolator="decelerate" 102 motion:duration="@integer/privacy_chip_animation_transition_duration" /> 103 104 <ConstraintSet android:id="@+id/invisible"> 105 <Constraint 106 android:id="@id/inactive_background" 107 android:alpha="0.0" 108 motion:layout_constraintBottom_toBottomOf="parent" 109 motion:layout_constraintEnd_toEndOf="parent" 110 motion:layout_constraintStart_toEndOf="parent" 111 motion:layout_constraintTop_toBottomOf="parent" /> 112 <Constraint 113 android:id="@id/active_background" 114 android:alpha="0.0" 115 motion:layout_constraintBottom_toBottomOf="parent" 116 motion:layout_constraintEnd_toEndOf="parent" 117 motion:layout_constraintStart_toEndOf="parent" 118 motion:layout_constraintTop_toBottomOf="parent" /> 119 <Constraint 120 android:id="@id/light_muted_icon" 121 android:src="@drawable/ic_mic_off_light" 122 android:visibility="gone" 123 android:alpha="0.0" 124 android:layout_width="@dimen/privacy_chip_icon_size" 125 android:layout_height="@dimen/privacy_chip_icon_size" 126 android:gravity="center" 127 android:scaleType="fitCenter" 128 motion:layout_constraintBottom_toBottomOf="parent" 129 motion:layout_constraintEnd_toEndOf="parent" 130 motion:layout_constraintStart_toEndOf="parent" 131 motion:layout_constraintTop_toBottomOf="parent" /> 132 <Constraint 133 android:id="@id/light_icon" 134 android:src="@drawable/ic_mic_light" 135 android:alpha="0.0" 136 android:layout_width="@dimen/privacy_chip_icon_size" 137 android:layout_height="@dimen/privacy_chip_icon_size" 138 android:gravity="center" 139 android:scaleType="fitCenter" 140 motion:layout_constraintBottom_toBottomOf="parent" 141 motion:layout_constraintEnd_toEndOf="parent" 142 motion:layout_constraintStart_toEndOf="parent" 143 motion:layout_constraintTop_toBottomOf="parent" /> 144 <Constraint 145 android:id="@id/dark_icon" 146 android:src="@drawable/ic_mic_dark" 147 android:alpha="0.0" 148 android:layout_width="@dimen/privacy_chip_icon_size" 149 android:layout_height="@dimen/privacy_chip_icon_size" 150 android:gravity="center" 151 android:scaleType="fitCenter" 152 motion:layout_constraintBottom_toBottomOf="parent" 153 motion:layout_constraintEnd_toEndOf="parent" 154 motion:layout_constraintStart_toEndOf="parent" 155 motion:layout_constraintTop_toBottomOf="parent" /> 156 <Constraint 157 android:id="@id/focus_view" 158 android:visibility="gone" 159 motion:layout_constraintBottom_toBottomOf="parent" 160 motion:layout_constraintEnd_toEndOf="parent" 161 motion:layout_constraintStart_toEndOf="parent" 162 motion:layout_constraintTop_toBottomOf="parent" /> 163 </ConstraintSet> 164 165 <ConstraintSet android:id="@+id/active_init"> 166 <Constraint 167 android:id="@id/inactive_background" 168 android:alpha="1.0" 169 motion:layout_constraintBottom_toBottomOf="parent" 170 motion:layout_constraintEnd_toEndOf="parent" 171 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 172 motion:layout_constraintTop_toTopOf="parent" /> 173 <Constraint 174 android:id="@id/active_background" 175 android:alpha="1.0" 176 motion:layout_constraintBottom_toBottomOf="parent" 177 motion:layout_constraintEnd_toEndOf="parent" 178 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 179 motion:layout_constraintTop_toTopOf="parent" /> 180 <Constraint 181 android:id="@id/light_muted_icon" 182 android:src="@drawable/ic_mic_off_light" 183 android:visibility="gone" 184 android:alpha="0.0" 185 android:layout_width="@dimen/privacy_chip_icon_size" 186 android:layout_height="@dimen/privacy_chip_icon_size" 187 android:gravity="center" 188 android:scaleType="fitCenter" 189 motion:layout_constraintBottom_toBottomOf="parent" 190 motion:layout_constraintEnd_toEndOf="parent" 191 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 192 motion:layout_constraintTop_toTopOf="parent" /> 193 <Constraint 194 android:id="@id/light_icon" 195 android:src="@drawable/ic_mic_light" 196 android:alpha="0.0" 197 android:layout_width="@dimen/privacy_chip_icon_size" 198 android:layout_height="@dimen/privacy_chip_icon_size" 199 android:gravity="center" 200 android:scaleType="fitCenter" 201 motion:layout_constraintBottom_toBottomOf="parent" 202 motion:layout_constraintEnd_toEndOf="parent" 203 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 204 motion:layout_constraintTop_toTopOf="parent" /> 205 <Constraint 206 android:id="@id/dark_icon" 207 android:src="@drawable/ic_mic_dark" 208 android:alpha="1.0" 209 android:layout_width="@dimen/privacy_chip_icon_size" 210 android:layout_height="@dimen/privacy_chip_icon_size" 211 android:gravity="center" 212 android:scaleType="fitCenter" 213 motion:layout_constraintBottom_toBottomOf="parent" 214 motion:layout_constraintEnd_toEndOf="parent" 215 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 216 motion:layout_constraintTop_toTopOf="parent" /> 217 <Constraint 218 android:id="@id/focus_view" 219 android:visibility="visible" 220 motion:layout_constraintBottom_toBottomOf="parent" 221 motion:layout_constraintEnd_toEndOf="parent" 222 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 223 motion:layout_constraintTop_toTopOf="parent" /> 224 </ConstraintSet> 225 226 <ConstraintSet android:id="@+id/active"> 227 <Constraint 228 android:id="@id/inactive_background" 229 android:alpha="1.0" 230 motion:layout_constraintBottom_toBottomOf="parent" 231 motion:layout_constraintEnd_toEndOf="parent" 232 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 233 motion:layout_constraintTop_toTopOf="parent" /> 234 <Constraint 235 android:id="@id/active_background" 236 android:alpha="1.0" 237 motion:layout_constraintBottom_toBottomOf="parent" 238 motion:layout_constraintEnd_toEndOf="parent" 239 motion:layout_constraintStart_toStartOf="@id/circular_active_indicator_vertical_guideline" 240 motion:layout_constraintTop_toTopOf="@id/circular_active_indicator_horizontal_guideline" /> 241 <Constraint 242 android:id="@id/light_muted_icon" 243 android:src="@drawable/ic_mic_off_light" 244 android:visibility="gone" 245 android:alpha="0.0" 246 android:layout_width="@dimen/privacy_chip_icon_size" 247 android:layout_height="@dimen/privacy_chip_icon_size" 248 android:gravity="center" 249 android:scaleType="fitCenter" 250 motion:layout_constraintBottom_toBottomOf="parent" 251 motion:layout_constraintEnd_toEndOf="parent" 252 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 253 motion:layout_constraintTop_toTopOf="parent" /> 254 <Constraint 255 android:id="@id/light_icon" 256 android:src="@drawable/ic_mic_light" 257 android:alpha="1.0" 258 android:layout_width="@dimen/privacy_chip_icon_size" 259 android:layout_height="@dimen/privacy_chip_icon_size" 260 android:gravity="center" 261 android:scaleType="fitCenter" 262 motion:layout_constraintBottom_toBottomOf="parent" 263 motion:layout_constraintEnd_toEndOf="parent" 264 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 265 motion:layout_constraintTop_toTopOf="parent" /> 266 <Constraint 267 android:id="@id/dark_icon" 268 android:src="@drawable/ic_mic_dark" 269 android:alpha="0.0" 270 android:layout_width="@dimen/privacy_chip_icon_size" 271 android:layout_height="@dimen/privacy_chip_icon_size" 272 android:gravity="center" 273 android:scaleType="fitCenter" 274 motion:layout_constraintBottom_toBottomOf="parent" 275 motion:layout_constraintEnd_toEndOf="parent" 276 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 277 motion:layout_constraintTop_toBottomOf="parent" /> 278 <Constraint 279 android:id="@id/focus_view" 280 android:visibility="visible" 281 motion:layout_constraintBottom_toBottomOf="parent" 282 motion:layout_constraintEnd_toEndOf="parent" 283 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 284 motion:layout_constraintTop_toTopOf="parent" /> 285 </ConstraintSet> 286 287 <ConstraintSet android:id="@+id/inactive"> 288 <Constraint 289 android:id="@id/inactive_background" 290 android:alpha="1.0" 291 motion:layout_constraintBottom_toBottomOf="parent" 292 motion:layout_constraintEnd_toEndOf="parent" 293 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 294 motion:layout_constraintTop_toTopOf="parent" /> 295 <Constraint 296 android:id="@id/active_background" 297 android:alpha="0.0" 298 motion:layout_constraintBottom_toBottomOf="parent" 299 motion:layout_constraintEnd_toEndOf="parent" 300 motion:layout_constraintStart_toEndOf="parent" 301 motion:layout_constraintTop_toBottomOf="parent" /> 302 <Constraint 303 android:id="@id/light_muted_icon" 304 android:src="@drawable/ic_mic_off_light" 305 android:visibility="gone" 306 android:alpha="0.0" 307 android:layout_width="@dimen/privacy_chip_icon_size" 308 android:layout_height="@dimen/privacy_chip_icon_size" 309 android:gravity="center" 310 android:scaleType="fitCenter" 311 motion:layout_constraintBottom_toBottomOf="parent" 312 motion:layout_constraintEnd_toEndOf="parent" 313 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 314 motion:layout_constraintTop_toTopOf="parent" /> 315 <Constraint 316 android:id="@id/light_icon" 317 android:src="@drawable/ic_mic_light" 318 android:alpha="1.0" 319 android:layout_width="@dimen/privacy_chip_icon_size" 320 android:layout_height="@dimen/privacy_chip_icon_size" 321 android:gravity="center" 322 android:scaleType="fitCenter" 323 motion:layout_constraintBottom_toBottomOf="parent" 324 motion:layout_constraintEnd_toEndOf="parent" 325 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 326 motion:layout_constraintTop_toTopOf="parent" /> 327 <Constraint 328 android:id="@id/dark_icon" 329 android:src="@drawable/ic_mic_dark" 330 android:alpha="0.0" 331 android:layout_width="@dimen/privacy_chip_icon_size" 332 android:layout_height="@dimen/privacy_chip_icon_size" 333 android:gravity="center" 334 android:scaleType="fitCenter" 335 motion:layout_constraintBottom_toBottomOf="parent" 336 motion:layout_constraintEnd_toEndOf="parent" 337 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 338 motion:layout_constraintTop_toTopOf="parent" /> 339 <Constraint 340 android:id="@id/focus_view" 341 android:visibility="visible" 342 motion:layout_constraintBottom_toBottomOf="parent" 343 motion:layout_constraintEnd_toEndOf="parent" 344 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 345 motion:layout_constraintTop_toTopOf="parent" /> 346 </ConstraintSet> 347 348 <ConstraintSet android:id="@+id/mic_off"> 349 <Constraint 350 android:id="@id/inactive_background" 351 android:alpha="1.0" 352 motion:layout_constraintBottom_toBottomOf="parent" 353 motion:layout_constraintEnd_toEndOf="parent" 354 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 355 motion:layout_constraintTop_toTopOf="parent" /> 356 <Constraint 357 android:id="@id/active_background" 358 android:alpha="0.0" 359 motion:layout_constraintBottom_toBottomOf="parent" 360 motion:layout_constraintEnd_toEndOf="parent" 361 motion:layout_constraintStart_toEndOf="parent" 362 motion:layout_constraintTop_toBottomOf="parent" /> 363 <Constraint 364 android:id="@id/light_muted_icon" 365 android:src="@drawable/ic_mic_off_light" 366 android:visibility="visible" 367 android:alpha="1.0" 368 android:layout_width="@dimen/privacy_chip_icon_size" 369 android:layout_height="@dimen/privacy_chip_icon_size" 370 android:gravity="center" 371 android:scaleType="fitCenter" 372 motion:layout_constraintBottom_toBottomOf="parent" 373 motion:layout_constraintEnd_toEndOf="parent" 374 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 375 motion:layout_constraintTop_toTopOf="parent" /> 376 <Constraint 377 android:id="@id/light_icon" 378 android:src="@drawable/ic_mic_light" 379 android:alpha="0.0" 380 android:layout_width="@dimen/privacy_chip_icon_size" 381 android:layout_height="@dimen/privacy_chip_icon_size" 382 android:gravity="center" 383 android:scaleType="fitCenter" 384 motion:layout_constraintBottom_toBottomOf="parent" 385 motion:layout_constraintEnd_toEndOf="parent" 386 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 387 motion:layout_constraintTop_toTopOf="parent" /> 388 <Constraint 389 android:id="@id/dark_icon" 390 android:src="@drawable/ic_mic_dark" 391 android:alpha="0.0" 392 android:layout_width="@dimen/privacy_chip_icon_size" 393 android:layout_height="@dimen/privacy_chip_icon_size" 394 android:gravity="center" 395 android:scaleType="fitCenter" 396 motion:layout_constraintBottom_toBottomOf="parent" 397 motion:layout_constraintEnd_toEndOf="parent" 398 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 399 motion:layout_constraintTop_toTopOf="parent" /> 400 <Constraint 401 android:id="@id/focus_view" 402 android:visibility="visible" 403 motion:layout_constraintBottom_toBottomOf="parent" 404 motion:layout_constraintEnd_toEndOf="parent" 405 motion:layout_constraintStart_toStartOf="@id/max_width_guideline" 406 motion:layout_constraintTop_toTopOf="parent" /> 407 </ConstraintSet> 408</MotionScene>