1/* 2 * Copyright (C) 2013 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 17 18package android.support.v4.view; 19 20import android.view.ViewGroup; 21 22class MarginLayoutParamsCompatJellybeanMr1 { 23 public static int getMarginStart(ViewGroup.MarginLayoutParams lp) { 24 return lp.getMarginStart(); 25 } 26 27 public static int getMarginEnd(ViewGroup.MarginLayoutParams lp) { 28 return lp.getMarginEnd(); 29 } 30 31 public static void setMarginStart(ViewGroup.MarginLayoutParams lp, int marginStart) { 32 lp.setMarginStart(marginStart); 33 } 34 35 public static void setMarginEnd(ViewGroup.MarginLayoutParams lp, int marginEnd) { 36 lp.setMarginEnd(marginEnd); 37 } 38 39 public static boolean isMarginRelative(ViewGroup.MarginLayoutParams lp) { 40 return lp.isMarginRelative(); 41 } 42 43 public static int getLayoutDirection(ViewGroup.MarginLayoutParams lp) { 44 return lp.getLayoutDirection(); 45 } 46 47 public static void setLayoutDirection(ViewGroup.MarginLayoutParams lp, int layoutDirection) { 48 lp.setLayoutDirection(layoutDirection); 49 } 50 51 public static void resolveLayoutDirection(ViewGroup.MarginLayoutParams lp, 52 int layoutDirection) { 53 lp.resolveLayoutDirection(layoutDirection); 54 } 55} 56