ViewCompatJellybeanMr1.java revision b897ffb1d1cfe37e2e005e7dcdcd97bc5f74205d
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.graphics.Paint; 20import android.view.Display; 21import android.view.View; 22 23/** 24 * Jellybean MR1 - specific View API access. 25 */ 26class ViewCompatJellybeanMr1 { 27 28 public static int getLabelFor(View view) { 29 return view.getLabelFor(); 30 } 31 32 public static void setLabelFor(View view, int id) { 33 view.setLabelFor(id); 34 } 35 36 public static void setLayerPaint(View view, Paint paint) { 37 view.setLayerPaint(paint); 38 } 39 40 public static int getLayoutDirection(View view) { 41 return view.getLayoutDirection(); 42 } 43 44 public static void setLayoutDirection(View view, int layoutDirection) { 45 view.setLayoutDirection(layoutDirection); 46 } 47 48 public static int getPaddingStart(View view) { 49 return view.getPaddingStart(); 50 } 51 52 public static int getPaddingEnd(View view) { 53 return view.getPaddingEnd(); 54 } 55 56 public static void setPaddingRelative(View view, int start, int top, int end, int bottom) { 57 view.setPaddingRelative(start, top, end, bottom); 58 } 59 60 public static int getWindowSystemUiVisibility(View view) { 61 return view.getWindowSystemUiVisibility(); 62 } 63 64 public static boolean isPaddingRelative(View view) { 65 return view.isPaddingRelative(); 66 } 67 68 public static Display getDisplay(View view) { 69 return view.getDisplay(); 70 } 71} 72