1c56ba65d20be8742ff717907a3a2cd81dd0e5f3cAdam Powell/*
2c56ba65d20be8742ff717907a3a2cd81dd0e5f3cAdam Powell * Copyright (C) 2013 The Android Open Source Project
3d59dd1decc75fb41e19928c21b90d25e3eda2559Dianne Hackborn *
4d59dd1decc75fb41e19928c21b90d25e3eda2559Dianne Hackborn * Licensed under the Apache License, Version 2.0 (the "License");
5d59dd1decc75fb41e19928c21b90d25e3eda2559Dianne Hackborn * you may not use this file except in compliance with the License.
6d59dd1decc75fb41e19928c21b90d25e3eda2559Dianne Hackborn * You may obtain a copy of the License at
7d59dd1decc75fb41e19928c21b90d25e3eda2559Dianne Hackborn *
8d59dd1decc75fb41e19928c21b90d25e3eda2559Dianne Hackborn *      http://www.apache.org/licenses/LICENSE-2.0
9d59dd1decc75fb41e19928c21b90d25e3eda2559Dianne Hackborn *
10d59dd1decc75fb41e19928c21b90d25e3eda2559Dianne Hackborn * Unless required by applicable law or agreed to in writing, software
11d59dd1decc75fb41e19928c21b90d25e3eda2559Dianne Hackborn * distributed under the License is distributed on an "AS IS" BASIS,
12d59dd1decc75fb41e19928c21b90d25e3eda2559Dianne Hackborn * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13d59dd1decc75fb41e19928c21b90d25e3eda2559Dianne Hackborn * See the License for the specific language governing permissions and
14d59dd1decc75fb41e19928c21b90d25e3eda2559Dianne Hackborn * limitations under the License.
15d59dd1decc75fb41e19928c21b90d25e3eda2559Dianne Hackborn */
16d59dd1decc75fb41e19928c21b90d25e3eda2559Dianne Hackborn
17c56ba65d20be8742ff717907a3a2cd81dd0e5f3cAdam Powell
181d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powellpackage android.support.v4.view;
191d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell
201d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powellimport android.graphics.Rect;
211d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powellimport android.view.Gravity;
221d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell
231d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powellclass GravityCompatJellybeanMr1 {
241d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell
251d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell    public static int getAbsoluteGravity(int gravity, int layoutDirection) {
261d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell        return Gravity.getAbsoluteGravity(gravity, layoutDirection);
271d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell    }
281d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell
291d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell    public static void apply(int gravity, int w, int h, Rect container, Rect outRect,
301d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell            int layoutDirection) {
311d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell        Gravity.apply(gravity, w, h, container, outRect, layoutDirection);
321d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell    }
331d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell
341d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell    public static void apply(int gravity, int w, int h, Rect container, int xAdj, int yAdj,
351d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell            Rect outRect, int layoutDirection) {
361d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell        Gravity.apply(gravity, w, h, container, xAdj, yAdj, outRect, layoutDirection);
371d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell    }
381d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell
391d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell    public static void applyDisplay(int gravity, Rect display, Rect inoutObj, int layoutDirection) {
401d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell        Gravity.applyDisplay(gravity, display, inoutObj, layoutDirection);
411d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell    }
421d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell}
43