1/*
2 * Copyright (C) 2011 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.view.View;
20import android.view.View.AccessibilityDelegate;
21import android.view.accessibility.AccessibilityEvent;
22import android.view.accessibility.AccessibilityNodeInfo;
23
24/**
25 * Helper for accessing newer features in View introduced in ICS.
26 */
27class ViewCompatICS {
28
29    public static boolean canScrollHorizontally(View v, int direction) {
30        return v.canScrollHorizontally(direction);
31    }
32
33    public static boolean canScrollVertically(View v, int direction) {
34        return v.canScrollVertically(direction);
35    }
36
37    public static void setAccessibilityDelegate(View v, Object delegate) {
38        v.setAccessibilityDelegate((AccessibilityDelegate) delegate);
39    }
40
41    public static void onPopulateAccessibilityEvent(View v, AccessibilityEvent event) {
42        v.onPopulateAccessibilityEvent(event);
43    }
44
45    public static void onInitializeAccessibilityEvent(View v, AccessibilityEvent event) {
46        v.onInitializeAccessibilityEvent(event);
47    }
48
49    public static void onInitializeAccessibilityNodeInfo(View v, Object info) {
50        v.onInitializeAccessibilityNodeInfo((AccessibilityNodeInfo) info);
51    }
52}
53