1/*
2 * Copyright (C) 2012 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
17package android.support.v4.view;
18
19import android.os.Bundle;
20import android.view.View;
21import android.view.ViewParent;
22
23/**
24 * Jellybean-specific View API access
25 */
26class ViewCompatJB {
27
28    public static boolean hasTransientState(View view) {
29        return view.hasTransientState();
30    }
31
32    public static void setHasTransientState(View view, boolean hasTransientState) {
33        view.setHasTransientState(hasTransientState);
34    }
35
36    public static void postInvalidateOnAnimation(View view) {
37        view.postInvalidateOnAnimation();
38    }
39
40    public static void postInvalidateOnAnimation(View view, int left, int top,
41            int right, int bottom) {
42        view.postInvalidate(left, top, right, bottom);
43    }
44
45    public static void postOnAnimation(View view, Runnable action) {
46        view.postOnAnimation(action);
47    }
48
49    public static void postOnAnimationDelayed(View view, Runnable action, long delayMillis) {
50        view.postOnAnimationDelayed(action, delayMillis);
51    }
52
53    public static int getImportantForAccessibility(View view) {
54        return view.getImportantForAccessibility();
55    }
56
57    public static void setImportantForAccessibility(View view, int mode) {
58        view.setImportantForAccessibility(mode);
59    }
60
61    public static boolean performAccessibilityAction(View view, int action, Bundle arguments) {
62        return view.performAccessibilityAction(action, arguments);
63    }
64
65    public static Object getAccessibilityNodeProvider(View view) {
66        return view.getAccessibilityNodeProvider();
67    }
68
69    public static ViewParent getParentForAccessibility(View view) {
70        return view.getParentForAccessibility();
71    }
72
73    public static int getMinimumWidth(View view) {
74        return view.getMinimumWidth();
75    }
76
77    public static int getMinimumHeight(View view) {
78        return view.getMinimumHeight();
79    }
80
81    public static void requestApplyInsets(View view) {
82        view.requestFitSystemWindows();
83    }
84
85    public static boolean getFitsSystemWindows(View view) {
86        return view.getFitsSystemWindows();
87    }
88}
89