blob: aeef4968951767f83197b1a444a68a131d80993b [file] [log] [blame]
Selim Cinekc18010f2016-01-20 13:41:30 -08001/*
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
Winsonc0d70582016-01-29 10:24:39 -080017package com.android.systemui;
Selim Cinekc18010f2016-01-20 13:41:30 -080018
19import android.view.animation.AccelerateDecelerateInterpolator;
Winson3b6ba1a2016-03-22 15:37:54 -070020import android.view.animation.AccelerateInterpolator;
Beverly8c785892018-01-31 17:25:52 -050021import android.view.animation.BounceInterpolator;
Winsonc0d70582016-01-29 10:24:39 -080022import android.view.animation.DecelerateInterpolator;
Selim Cinekc18010f2016-01-20 13:41:30 -080023import android.view.animation.Interpolator;
24import android.view.animation.LinearInterpolator;
25import android.view.animation.PathInterpolator;
26
Selim Cinek061d9072016-12-20 13:17:03 +010027import com.android.systemui.statusbar.stack.HeadsUpAppearInterpolator;
28
Selim Cinekc18010f2016-01-20 13:41:30 -080029/**
30 * Utility class to receive interpolators from
31 */
32public class Interpolators {
33 public static final Interpolator FAST_OUT_SLOW_IN = new PathInterpolator(0.4f, 0f, 0.2f, 1f);
34 public static final Interpolator FAST_OUT_LINEAR_IN = new PathInterpolator(0.4f, 0f, 1f, 1f);
35 public static final Interpolator LINEAR_OUT_SLOW_IN = new PathInterpolator(0f, 0f, 0.2f, 1f);
36 public static final Interpolator ALPHA_IN = new PathInterpolator(0.4f, 0f, 1f, 1f);
37 public static final Interpolator ALPHA_OUT = new PathInterpolator(0f, 0f, 0.8f, 1f);
38 public static final Interpolator LINEAR = new LinearInterpolator();
Winson3b6ba1a2016-03-22 15:37:54 -070039 public static final Interpolator ACCELERATE = new AccelerateInterpolator();
Selim Cinekc18010f2016-01-20 13:41:30 -080040 public static final Interpolator ACCELERATE_DECELERATE = new AccelerateDecelerateInterpolator();
Winsonc0d70582016-01-29 10:24:39 -080041 public static final Interpolator DECELERATE_QUINT = new DecelerateInterpolator(2.5f);
Adrian Roosd15745b2016-06-01 15:09:42 -070042 public static final Interpolator CUSTOM_40_40 = new PathInterpolator(0.4f, 0f, 0.6f, 1f);
Selim Cinek061d9072016-12-20 13:17:03 +010043 public static final Interpolator HEADS_UP_APPEAR = new HeadsUpAppearInterpolator();
44 public static final Interpolator ICON_OVERSHOT = new PathInterpolator(0.4f, 0f, 0.2f, 1.4f);
Selim Cinekdf5501b2017-04-14 20:01:27 -070045 public static final Interpolator PANEL_CLOSE_ACCELERATED
46 = new PathInterpolator(0.3f, 0, 0.5f, 1);
Beverly8c785892018-01-31 17:25:52 -050047 public static final Interpolator BOUNCE = new BounceInterpolator();
Jorim Jaggiea4a19f2016-02-03 21:31:27 -080048
49 /**
50 * Interpolator to be used when animating a move based on a click. Pair with enough duration.
51 */
52 public static final Interpolator TOUCH_RESPONSE =
53 new PathInterpolator(0.3f, 0f, 0.1f, 1f);
Selim Cinekc18010f2016-01-20 13:41:30 -080054}