1c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek/*
2c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek * Copyright (C) 2016 The Android Open Source Project
3c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek *
4c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek * Licensed under the Apache License, Version 2.0 (the "License");
5c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek * you may not use this file except in compliance with the License.
6c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek * You may obtain a copy of the License at
7c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek *
8c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek *      http://www.apache.org/licenses/LICENSE-2.0
9c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek *
10c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek * Unless required by applicable law or agreed to in writing, software
11c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek * distributed under the License is distributed on an "AS IS" BASIS,
12c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek * See the License for the specific language governing permissions and
14c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek * limitations under the License
15c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek */
16c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek
17c0d7058b14c24cd07912f5629c26b39b7b4673d5Winsonpackage com.android.systemui;
18c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek
19c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinekimport android.view.animation.AccelerateDecelerateInterpolator;
203b6ba1ab144c53752841869627a1b9f6d357c404Winsonimport android.view.animation.AccelerateInterpolator;
218c78589871a4ce0edb071726c9a8c935a5e4745bBeverlyimport android.view.animation.BounceInterpolator;
22c0d7058b14c24cd07912f5629c26b39b7b4673d5Winsonimport android.view.animation.DecelerateInterpolator;
23c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinekimport android.view.animation.Interpolator;
24c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinekimport android.view.animation.LinearInterpolator;
25c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinekimport android.view.animation.PathInterpolator;
26c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek
27061d90729bba582395e9050898dab20fd434cf66Selim Cinekimport com.android.systemui.statusbar.stack.HeadsUpAppearInterpolator;
28061d90729bba582395e9050898dab20fd434cf66Selim Cinek
29c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek/**
30c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek * Utility class to receive interpolators from
31c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek */
32c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinekpublic class Interpolators {
33c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek    public static final Interpolator FAST_OUT_SLOW_IN = new PathInterpolator(0.4f, 0f, 0.2f, 1f);
34c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek    public static final Interpolator FAST_OUT_LINEAR_IN = new PathInterpolator(0.4f, 0f, 1f, 1f);
35c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek    public static final Interpolator LINEAR_OUT_SLOW_IN = new PathInterpolator(0f, 0f, 0.2f, 1f);
36c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek    public static final Interpolator ALPHA_IN = new PathInterpolator(0.4f, 0f, 1f, 1f);
37c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek    public static final Interpolator ALPHA_OUT = new PathInterpolator(0f, 0f, 0.8f, 1f);
38c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek    public static final Interpolator LINEAR = new LinearInterpolator();
393b6ba1ab144c53752841869627a1b9f6d357c404Winson    public static final Interpolator ACCELERATE = new AccelerateInterpolator();
40c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek    public static final Interpolator ACCELERATE_DECELERATE = new AccelerateDecelerateInterpolator();
41c0d7058b14c24cd07912f5629c26b39b7b4673d5Winson    public static final Interpolator DECELERATE_QUINT = new DecelerateInterpolator(2.5f);
42d15745bdba23a2cccb08e27bf9aae4d9d4aff270Adrian Roos    public static final Interpolator CUSTOM_40_40 = new PathInterpolator(0.4f, 0f, 0.6f, 1f);
43061d90729bba582395e9050898dab20fd434cf66Selim Cinek    public static final Interpolator HEADS_UP_APPEAR = new HeadsUpAppearInterpolator();
44061d90729bba582395e9050898dab20fd434cf66Selim Cinek    public static final Interpolator ICON_OVERSHOT = new PathInterpolator(0.4f, 0f, 0.2f, 1.4f);
45df5501b0cc0e9a1a53ae42acb4a2974605034acfSelim Cinek    public static final Interpolator PANEL_CLOSE_ACCELERATED
46df5501b0cc0e9a1a53ae42acb4a2974605034acfSelim Cinek            = new PathInterpolator(0.3f, 0, 0.5f, 1);
478c78589871a4ce0edb071726c9a8c935a5e4745bBeverly    public static final Interpolator BOUNCE = new BounceInterpolator();
48ea4a19f1aa27ba4b9fc4ec0af1d19b4177f801dfJorim Jaggi
49ea4a19f1aa27ba4b9fc4ec0af1d19b4177f801dfJorim Jaggi    /**
50ea4a19f1aa27ba4b9fc4ec0af1d19b4177f801dfJorim Jaggi     * Interpolator to be used when animating a move based on a click. Pair with enough duration.
51ea4a19f1aa27ba4b9fc4ec0af1d19b4177f801dfJorim Jaggi     */
52ea4a19f1aa27ba4b9fc4ec0af1d19b4177f801dfJorim Jaggi    public static final Interpolator TOUCH_RESPONSE =
53ea4a19f1aa27ba4b9fc4ec0af1d19b4177f801dfJorim Jaggi            new PathInterpolator(0.3f, 0f, 0.1f, 1f);
54c18010f6720f606003cde3cd376ddacaca30f6e5Selim Cinek}
55