10af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov/* 20af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov * Copyright (C) 2012 The Android Open Source Project 30af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov * 40af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov * Licensed under the Apache License, Version 2.0 (the "License"); 50af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov * you may not use this file except in compliance with the License. 60af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov * You may obtain a copy of the License at 70af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov * 80af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov * http://www.apache.org/licenses/LICENSE-2.0 90af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov * 100af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov * Unless required by applicable law or agreed to in writing, software 110af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov * distributed under the License is distributed on an "AS IS" BASIS, 120af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 130af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov * See the License for the specific language governing permissions and 140af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov * limitations under the License. 150af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov */ 160af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov 170af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganovpackage android.support.v4.view; 180af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov 196debd2bbcae1cd285d2e21db633998b7801f9f40Adam Powellimport android.graphics.Paint; 200af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganovimport android.view.View; 210af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov 220af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov/** 230af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov * Jellybean MR1 - specific View API access. 240af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov */ 256debd2bbcae1cd285d2e21db633998b7801f9f40Adam Powellclass ViewCompatJellybeanMr1 { 260af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov 270af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov public static int getLabelFor(View view) { 280af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov return view.getLabelFor(); 290af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov } 300af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov 310af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov public static void setLabelFor(View view, int id) { 320af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov view.setLabelFor(id); 330af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov } 346debd2bbcae1cd285d2e21db633998b7801f9f40Adam Powell 356debd2bbcae1cd285d2e21db633998b7801f9f40Adam Powell public static void setLayerPaint(View view, Paint paint) { 366debd2bbcae1cd285d2e21db633998b7801f9f40Adam Powell view.setLayerPaint(paint); 376debd2bbcae1cd285d2e21db633998b7801f9f40Adam Powell } 381d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell 391d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell public static int getLayoutDirection(View view) { 401d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell return view.getLayoutDirection(); 411d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell } 421d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell 431d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell public static void setLayoutDirection(View view, int layoutDirection) { 441d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell view.setLayoutDirection(layoutDirection); 451d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell } 46e096e4c526feeb64833b5a75649ec36d75d7cbbfAdam Powell 47e096e4c526feeb64833b5a75649ec36d75d7cbbfAdam Powell public static int getPaddingStart(View view) { 48e096e4c526feeb64833b5a75649ec36d75d7cbbfAdam Powell return view.getPaddingStart(); 49e096e4c526feeb64833b5a75649ec36d75d7cbbfAdam Powell } 50e096e4c526feeb64833b5a75649ec36d75d7cbbfAdam Powell 51e096e4c526feeb64833b5a75649ec36d75d7cbbfAdam Powell public static int getPaddingEnd(View view) { 52e096e4c526feeb64833b5a75649ec36d75d7cbbfAdam Powell return view.getPaddingEnd(); 53e096e4c526feeb64833b5a75649ec36d75d7cbbfAdam Powell } 54e096e4c526feeb64833b5a75649ec36d75d7cbbfAdam Powell 55e096e4c526feeb64833b5a75649ec36d75d7cbbfAdam Powell public static void setPaddingRelative(View view, int start, int top, int end, int bottom) { 56e096e4c526feeb64833b5a75649ec36d75d7cbbfAdam Powell view.setPaddingRelative(start, top, end, bottom); 57e096e4c526feeb64833b5a75649ec36d75d7cbbfAdam Powell } 5849c78900da0d43140fb602431fb93212bd7f6c70Chris Banes 5949c78900da0d43140fb602431fb93212bd7f6c70Chris Banes public static int getWindowSystemUiVisibility(View view) { 6049c78900da0d43140fb602431fb93212bd7f6c70Chris Banes return view.getWindowSystemUiVisibility(); 6149c78900da0d43140fb602431fb93212bd7f6c70Chris Banes } 620af001b9e0d173f6b9836e66539bf764b897c36fSvetoslav Ganov} 63