Home | History | Annotate | Download | only in view

Lines Matching defs:Gravity

23 import android.view.Gravity;
26 * Compatibility shim for accessing newer functionality from {@link android.view.Gravity}.
35 public static final int START = RELATIVE_LAYOUT_DIRECTION | Gravity.LEFT;
38 public static final int END = RELATIVE_LAYOUT_DIRECTION | Gravity.RIGHT;
41 * Binary mask for the horizontal gravity and script specific direction bit.
46 * Apply a gravity constant to an object and take care if layout direction is RTL or not.
48 * @param gravity The desired placement of the object, as defined by the
62 public static void apply(int gravity, int w, int h, Rect container,
65 Gravity.apply(gravity, w, h, container, outRect, layoutDirection);
67 Gravity.apply(gravity, w, h, container, outRect);
72 * Apply a gravity constant to an object.
74 * @param gravity The desired placement of the object, as defined by the
81 * @param xAdj Offset to apply to the X axis. If gravity is LEFT this
82 * pushes it to the right; if gravity is RIGHT it pushes it to
83 * the left; if gravity is CENTER_HORIZONTAL it pushes it to the
85 * @param yAdj Offset to apply to the Y axis. If gravity is TOP this pushes
86 * it down; if gravity is BOTTOM it pushes it up; if gravity is
96 public static void apply(int gravity, int w, int h, Rect container,
99 Gravity.apply(gravity, w, h, container, xAdj, yAdj, outRect, layoutDirection);
101 Gravity.apply(gravity, w, h, container, xAdj, yAdj, outRect);
106 * Apply additional gravity behavior based on the overall "display" that an
108 * {@link android.view.Gravity#apply(int, int, int, Rect, int, int, Rect)} to place the object
110 * to be visible in the display; the gravity flags
111 * {@link android.view.Gravity#DISPLAY_CLIP_HORIZONTAL} and
112 * {@link android.view.Gravity#DISPLAY_CLIP_VERTICAL} can be used to change this behavior.
114 * @param gravity Gravity constants to modify the placement within the
125 public static void applyDisplay(int gravity, Rect display, Rect inoutObj, int layoutDirection) {
127 Gravity.applyDisplay(gravity, display, inoutObj, layoutDirection);
129 Gravity.applyDisplay(gravity, display, inoutObj);
134 * <p>Convert script specific gravity to absolute horizontal value.</p>
140 * @param gravity The gravity to convert to absolute (horizontal) values.
142 * @return gravity converted to absolute (horizontal) values.
144 public static int getAbsoluteGravity(int gravity, int layoutDirection) {
146 return Gravity.getAbsoluteGravity(gravity, layoutDirection);
149 return gravity & ~RELATIVE_LAYOUT_DIRECTION;