Home | History | Annotate | Download | only in systemui
      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 
     17 package com.android.systemui;
     18 
     19 import android.view.animation.AccelerateDecelerateInterpolator;
     20 import android.view.animation.AccelerateInterpolator;
     21 import android.view.animation.DecelerateInterpolator;
     22 import android.view.animation.Interpolator;
     23 import android.view.animation.LinearInterpolator;
     24 import android.view.animation.PathInterpolator;
     25 
     26 /**
     27  * Utility class to receive interpolators from
     28  */
     29 public class Interpolators {
     30     public static final Interpolator FAST_OUT_SLOW_IN = new PathInterpolator(0.4f, 0f, 0.2f, 1f);
     31     public static final Interpolator FAST_OUT_LINEAR_IN = new PathInterpolator(0.4f, 0f, 1f, 1f);
     32     public static final Interpolator LINEAR_OUT_SLOW_IN = new PathInterpolator(0f, 0f, 0.2f, 1f);
     33     public static final Interpolator ALPHA_IN = new PathInterpolator(0.4f, 0f, 1f, 1f);
     34     public static final Interpolator ALPHA_OUT = new PathInterpolator(0f, 0f, 0.8f, 1f);
     35     public static final Interpolator LINEAR = new LinearInterpolator();
     36     public static final Interpolator ACCELERATE = new AccelerateInterpolator();
     37     public static final Interpolator ACCELERATE_DECELERATE = new AccelerateDecelerateInterpolator();
     38     public static final Interpolator DECELERATE_QUINT = new DecelerateInterpolator(2.5f);
     39     public static final Interpolator CUSTOM_40_40 = new PathInterpolator(0.4f, 0f, 0.6f, 1f);
     40 
     41     /**
     42      * Interpolator to be used when animating a move based on a click. Pair with enough duration.
     43      */
     44     public static final Interpolator TOUCH_RESPONSE =
     45             new PathInterpolator(0.3f, 0f, 0.1f, 1f);
     46 }
     47