Interpolators.java revision c0d7058b14c24cd07912f5629c26b39b7b4673d5
1/* 2 * Copyright (C) 2016 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 17package com.android.systemui; 18 19import android.view.animation.AccelerateDecelerateInterpolator; 20import android.view.animation.DecelerateInterpolator; 21import android.view.animation.Interpolator; 22import android.view.animation.LinearInterpolator; 23import android.view.animation.PathInterpolator; 24 25/** 26 * Utility class to receive interpolators from 27 */ 28public class Interpolators { 29 public static final Interpolator FAST_OUT_SLOW_IN = new PathInterpolator(0.4f, 0f, 0.2f, 1f); 30 public static final Interpolator FAST_OUT_LINEAR_IN = new PathInterpolator(0.4f, 0f, 1f, 1f); 31 public static final Interpolator LINEAR_OUT_SLOW_IN = new PathInterpolator(0f, 0f, 0.2f, 1f); 32 public static final Interpolator ALPHA_IN = new PathInterpolator(0.4f, 0f, 1f, 1f); 33 public static final Interpolator ALPHA_OUT = new PathInterpolator(0f, 0f, 0.8f, 1f); 34 public static final Interpolator LINEAR = new LinearInterpolator(); 35 public static final Interpolator ACCELERATE_DECELERATE = new AccelerateDecelerateInterpolator(); 36 public static final Interpolator DECELERATE_QUINT = new DecelerateInterpolator(2.5f); 37} 38