195400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu/*
295400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu * Copyright (C) 2014 The Android Open Source Project
395400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu *
495400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
595400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu * in compliance with the License. You may obtain a copy of the License at
695400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu *
795400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu * http://www.apache.org/licenses/LICENSE-2.0
895400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu *
995400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu * Unless required by applicable law or agreed to in writing, software distributed under the License
1095400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
1195400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu * or implied. See the License for the specific language governing permissions and limitations under
1295400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu * the License.
1395400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu */
1495400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gupackage android.support.v17.leanback.transition;
1595400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu
16116c06a5bc40fd4d1753012582842ecc5cd06aecDake Guimport android.R;
17116c06a5bc40fd4d1753012582842ecc5cd06aecDake Guimport android.content.Context;
180fff85d7f9dee67ec5116f3cba4e8b3961f805a7Craig Stoutimport android.transition.ChangeTransform;
1995400e6d31a1ac09e48cb8944a79b7250484aa4cDake Guimport android.view.Window;
20116c06a5bc40fd4d1753012582842ecc5cd06aecDake Guimport android.view.animation.AnimationUtils;
2195400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu
2295400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gufinal class TransitionHelperApi21 {
2395400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu
2495400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu    TransitionHelperApi21() {
2595400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu    }
2695400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu
27116c06a5bc40fd4d1753012582842ecc5cd06aecDake Gu    public static Object getSharedElementEnterTransition(Window window) {
2895400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu        return window.getSharedElementEnterTransition();
2995400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu    }
3095400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu
31116c06a5bc40fd4d1753012582842ecc5cd06aecDake Gu    public static Object getSharedElementReturnTransition(Window window) {
3295400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu        return window.getSharedElementReturnTransition();
3395400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu    }
3495400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu
35116c06a5bc40fd4d1753012582842ecc5cd06aecDake Gu    public static Object getSharedElementExitTransition(Window window) {
3695400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu        return window.getSharedElementExitTransition();
3795400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu    }
3895400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu
39116c06a5bc40fd4d1753012582842ecc5cd06aecDake Gu    public static Object getSharedElementReenterTransition(Window window) {
4095400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu        return window.getSharedElementReenterTransition();
4195400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu    }
4295400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu
43116c06a5bc40fd4d1753012582842ecc5cd06aecDake Gu    public static Object getEnterTransition(Window window) {
4495400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu        return window.getEnterTransition();
4595400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu    }
4695400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu
47116c06a5bc40fd4d1753012582842ecc5cd06aecDake Gu    public static Object getReturnTransition(Window window) {
4895400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu        return window.getReturnTransition();
4995400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu    }
5095400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu
51116c06a5bc40fd4d1753012582842ecc5cd06aecDake Gu    public static Object getExitTransition(Window window) {
5295400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu        return window.getExitTransition();
5395400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu    }
5495400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu
55116c06a5bc40fd4d1753012582842ecc5cd06aecDake Gu    public static Object getReenterTransition(Window window) {
5695400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu        return window.getReenterTransition();
5795400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu    }
580fff85d7f9dee67ec5116f3cba4e8b3961f805a7Craig Stout
59116c06a5bc40fd4d1753012582842ecc5cd06aecDake Gu    public static Object createScale() {
600fff85d7f9dee67ec5116f3cba4e8b3961f805a7Craig Stout        return new ChangeTransform();
610fff85d7f9dee67ec5116f3cba4e8b3961f805a7Craig Stout    }
62116c06a5bc40fd4d1753012582842ecc5cd06aecDake Gu
63116c06a5bc40fd4d1753012582842ecc5cd06aecDake Gu    public static Object createDefaultInterpolator(Context context) {
64116c06a5bc40fd4d1753012582842ecc5cd06aecDake Gu        return AnimationUtils.loadInterpolator(context, R.interpolator.fast_out_linear_in);
65116c06a5bc40fd4d1753012582842ecc5cd06aecDake Gu    }
6695400e6d31a1ac09e48cb8944a79b7250484aa4cDake Gu}
67