1/*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 * in compliance with the License. You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software distributed under the License
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 * or implied. See the License for the specific language governing permissions and limitations under
12 * the License.
13 */
14package android.support.v17.leanback.transition;
15
16import android.R;
17import android.content.Context;
18import android.transition.ChangeTransform;
19import android.view.Window;
20import android.view.animation.AnimationUtils;
21
22final class TransitionHelperApi21 {
23
24    TransitionHelperApi21() {
25    }
26
27    public static Object getSharedElementEnterTransition(Window window) {
28        return window.getSharedElementEnterTransition();
29    }
30
31    public static Object getSharedElementReturnTransition(Window window) {
32        return window.getSharedElementReturnTransition();
33    }
34
35    public static Object getSharedElementExitTransition(Window window) {
36        return window.getSharedElementExitTransition();
37    }
38
39    public static Object getSharedElementReenterTransition(Window window) {
40        return window.getSharedElementReenterTransition();
41    }
42
43    public static Object getEnterTransition(Window window) {
44        return window.getEnterTransition();
45    }
46
47    public static Object getReturnTransition(Window window) {
48        return window.getReturnTransition();
49    }
50
51    public static Object getExitTransition(Window window) {
52        return window.getExitTransition();
53    }
54
55    public static Object getReenterTransition(Window window) {
56        return window.getReenterTransition();
57    }
58
59    public static Object createScale() {
60        return new ChangeTransform();
61    }
62
63    public static Object createDefaultInterpolator(Context context) {
64        return AnimationUtils.loadInterpolator(context, R.interpolator.fast_out_linear_in);
65    }
66}
67