11d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell/*
21d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell * Copyright (C) 2013 The Android Open Source Project
31d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell *
41d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell * Licensed under the Apache License, Version 2.0 (the "License");
51d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell * you may not use this file except in compliance with the License.
61d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell * You may obtain a copy of the License at
71d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell *
81d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell *      http://www.apache.org/licenses/LICENSE-2.0
91d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell *
101d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell * Unless required by applicable law or agreed to in writing, software
111d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell * distributed under the License is distributed on an "AS IS" BASIS,
121d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
131d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell * See the License for the specific language governing permissions and
141d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell * limitations under the License.
151d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell */
161d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam Powell
171d26501f0c8e9f3577f651938a03f6b3a1a672c7Adam 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