1 /* 2 * Copyright (C) 2023 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 package com.android.wallpaper.picker.customization.animation; 17 18 import android.view.animation.Interpolator; 19 import android.view.animation.PathInterpolator; 20 21 /** 22 * Copied over from: 23 * frameworks/base/packages/SystemUI/animation/src/com/android/systemui/animation/Interpolators.java 24 * 25 * Utility class to receive interpolators from. 26 * 27 * Make sure that changes made to this class are also reflected in {@link InterpolatorsAndroidX}. 28 * Please consider using the androidx dependencies featuring better testability altogether. 29 */ 30 // TODO (b/281878827): remove this and use loading animation in SystemUIShaderLib when available 31 public class Interpolators { 32 /* 33 * ============================================================================================ 34 * Standard interpolators. 35 * ============================================================================================ 36 */ 37 38 /** 39 * The standard interpolator that should be used on every normal animation 40 */ 41 public static final Interpolator STANDARD = new PathInterpolator( 42 0.2f, 0f, 0f, 1f); 43 44 /** 45 * The standard decelerating interpolator that should be used on every regular movement of 46 * content that is appearing e.g. when coming from off screen. 47 */ 48 public static final Interpolator STANDARD_DECELERATE = new PathInterpolator( 49 0f, 0f, 0f, 1f); 50 } 51