Searched defs:gravity (Results 1 - 25 of 71) sorted by relevance

123

/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/android/support/
H A DDrawerLayoutUtil.java39 int gravity = -1;
41 gravity = LEFT;
43 gravity = RIGHT;
45 gravity = START;
47 gravity = END;
49 if (gravity > 0) {
50 openDrawer(drawerLayout, gravity);
54 private static void openDrawer(View drawerLayout, int gravity) { argument
57 gravity);
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/
H A DMockView.java115 public void setGravity(int gravity) { argument
116 mView.setGravity(gravity);
/frameworks/support/core-utils/api21/android/support/v4/graphics/drawable/
H A DRoundedBitmapDrawable21.java53 void gravityCompatApply(int gravity, int bitmapWidth, int bitmapHeight, argument
55 Gravity.apply(gravity, bitmapWidth, bitmapHeight,
/frameworks/support/design/tests/src/android/support/design/testutils/
H A DFloatingActionButtonActions.java134 public static ViewAction setLayoutGravity(final int gravity) { argument
152 lp.gravity = gravity;
H A DTestUtilsMatchers.java371 * Returns a matcher that matches FloatingActionButtons with the specified gravity.
373 public static Matcher withFabContentAreaOnMargins(final int gravity) { argument
396 final int absGravity = GravityCompat.getAbsoluteGravity(gravity,
/frameworks/support/compat/java/android/support/v4/view/
H A DGravityCompat.java41 * 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, argument
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 i
96 apply(int gravity, int w, int h, Rect container, int xAdj, int yAdj, Rect outRect, int layoutDirection) argument
125 applyDisplay(int gravity, Rect display, Rect inoutObj, int layoutDirection) argument
144 getAbsoluteGravity(int gravity, int layoutDirection) argument
[all...]
/frameworks/support/core-utils/java/android/support/v4/graphics/drawable/
H A DRoundedBitmapDrawableFactory.java55 void gravityCompatApply(int gravity, int bitmapWidth, int bitmapHeight, argument
57 GravityCompat.apply(gravity, bitmapWidth, bitmapHeight,
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/util/
H A DTouchUtils.java182 private static void getStartLocation(View v, int gravity, int[] xy) { argument
188 switch (gravity & Gravity.VERTICAL_GRAVITY_MASK) {
201 switch (gravity & Gravity.HORIZONTAL_GRAVITY_MASK) {
215 public static int dragViewTo(Instrumentation inst, View v, int gravity, int toX, argument
219 getStartLocation(v, gravity, xy);
233 public static int dragViewToX(Instrumentation inst, View v, int gravity, int toX) { argument
236 getStartLocation(v, gravity, xy);
248 public static int dragViewToY(Instrumentation inst, View v, int gravity, int toY) { argument
251 getStartLocation(v, gravity, xy);
/frameworks/base/core/java/android/inputmethodservice/
H A DSoftInputWindow.java69 int windowType, int gravity, boolean takesFocus) {
76 mGravity = gravity;
106 * @param gravity The boundary of the screen to stick. See {#link
111 public void setGravity(int gravity) { argument
113 lp.gravity = gravity;
119 return getWindow().getAttributes().gravity;
123 if (lp.gravity == Gravity.TOP || lp.gravity == Gravity.BOTTOM) {
174 lp.gravity
67 SoftInputWindow(Context context, String name, int theme, Callback callback, KeyEvent.Callback keyEventCallback, KeyEvent.DispatcherState dispatcherState, int windowType, int gravity, boolean takesFocus) argument
[all...]
/frameworks/base/core/java/android/widget/
H A DPopupMenu.java65 * gravity.
71 * @param gravity The {@link Gravity} value for aligning the popup with its
74 public PopupMenu(Context context, View anchor, int gravity) { argument
75 this(context, anchor, gravity, R.attr.popupMenuStyle, 0);
85 * @param gravity The {@link Gravity} value for aligning the popup with its
95 public PopupMenu(Context context, View anchor, int gravity, int popupStyleAttr, argument
116 mPopup.setGravity(gravity);
128 * Sets the gravity used to align the popup window to its anchor view.
133 * @param gravity the gravity use
136 setGravity(int gravity) argument
[all...]
H A DFrameLayout.java44 * and control their position within the FrameLayout by assigning gravity to each child, using the
261 layoutChildren(left, top, right, bottom, false /* no force left gravity */);
284 int gravity = lp.gravity;
285 if (gravity == -1) {
286 gravity = DEFAULT_CHILD_GRAVITY;
290 final int absoluteGravity = Gravity.getAbsoluteGravity(gravity, layoutDirection);
291 final int verticalGravity = gravity & Gravity.VERTICAL_GRAVITY_MASK;
421 * Value for {@link #gravity} indicating that a gravity ha
436 public int gravity = UNSPECIFIED_GRAVITY; field in class:FrameLayout.LayoutParams
462 LayoutParams(int width, int height, int gravity) argument
[all...]
H A DToast.java219 public void setGravity(int gravity, int xOffset, int yOffset) { argument
220 mTN.mGravity = gravity;
235 * Return the X offset in pixels to apply to the gravity's location.
242 * Return the Y offset in pixels to apply to the gravity's location.
470 final int gravity = Gravity.getAbsoluteGravity(mGravity, config.getLayoutDirection());
471 mParams.gravity = gravity;
472 if ((gravity & Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.FILL_HORIZONTAL) {
475 if ((gravity & Gravity.VERTICAL_GRAVITY_MASK) == Gravity.FILL_VERTICAL) {
/frameworks/base/graphics/java/android/graphics/drawable/
H A DClipDrawable.java38 * and height based on the level, as well as a gravity to control where it is
68 * Creates a new clip drawable with the specified gravity and orientation.
71 * @param gravity gravity constant (see {@link Gravity} used to position
76 public ClipDrawable(Drawable drawable, int gravity, int orientation) { argument
79 mState.mGravity = gravity;
H A DScaleDrawable.java41 * and height based on the level, as well as a gravity to control where it is
76 * Creates a new scale drawable with the specified gravity and scale
80 * @param gravity gravity constant (see {@link Gravity} used to position
87 public ScaleDrawable(Drawable drawable, int gravity, float scaleWidth, float scaleHeight) { argument
90 mState.mGravity = gravity;
/frameworks/support/compat/java/android/support/v4/widget/
H A DPopupWindowCompat.java43 int gravity) {
44 final int hgrav = GravityCompat.getAbsoluteGravity(gravity,
113 int gravity) {
114 popup.showAsDropDown(anchor, xoff, yoff, gravity);
214 * @param gravity Alignment of the popup relative to the anchor
217 int gravity) {
218 IMPL.showAsDropDown(popup, anchor, xoff, yoff, gravity);
42 showAsDropDown(PopupWindow popup, View anchor, int xoff, int yoff, int gravity) argument
112 showAsDropDown(PopupWindow popup, View anchor, int xoff, int yoff, int gravity) argument
216 showAsDropDown(PopupWindow popup, View anchor, int xoff, int yoff, int gravity) argument
/frameworks/support/design/src/android/support/design/widget/
H A DHeaderScrollingViewBehavior.java127 GravityCompat.apply(resolveGravity(lp.gravity), child.getMeasuredWidth(),
150 private static int resolveGravity(int gravity) { argument
151 return gravity == Gravity.NO_GRAVITY ? GravityCompat.START | Gravity.TOP : gravity;
/frameworks/support/percent/src/android/support/percent/
H A DPercentFrameLayout.java188 public LayoutParams(int width, int height, int gravity) { argument
189 super(width, height, gravity);
202 gravity = source.gravity;
/frameworks/support/v7/appcompat/src/android/support/v7/widget/
H A DPopupMenu.java68 * gravity.
74 * @param gravity The {@link Gravity} value for aligning the popup with its
77 public PopupMenu(@NonNull Context context, @NonNull View anchor, int gravity) { argument
78 this(context, anchor, gravity, R.attr.popupMenuStyle, 0);
88 * @param gravity The {@link Gravity} value for aligning the popup with its
98 public PopupMenu(@NonNull Context context, @NonNull View anchor, int gravity, argument
119 mPopup.setGravity(gravity);
131 * Sets the gravity used to align the popup window to its anchor view.
136 * @param gravity the gravity use
139 setGravity(int gravity) argument
[all...]
/frameworks/base/core/java/android/view/
H A DGravity.java26 /** Constant indicating that no gravity has been set **/
29 /** Raw bit indicating the gravity for an axis has been specified. */
37 * container, based on the gravity direction being applied. */
90 * Binary mask to get the absolute horizontal gravity of a gravity.
95 * Binary mask to get the vertical gravity of a gravity.
121 * Binary mask for the horizontal gravity and script specific direction bit.
126 * Apply a gravity constant to an object. This supposes that the layout direction is LTR.
128 * @param gravity Th
138 apply(int gravity, int w, int h, Rect container, Rect outRect) argument
159 apply(int gravity, int w, int h, Rect container, Rect outRect, int layoutDirection) argument
186 apply(int gravity, int w, int h, Rect container, int xAdj, int yAdj, Rect outRect) argument
296 apply(int gravity, int w, int h, Rect container, int xAdj, int yAdj, Rect outRect, int layoutDirection) argument
318 applyDisplay(int gravity, Rect display, Rect inoutObj) argument
376 applyDisplay(int gravity, Rect display, Rect inoutObj, int layoutDirection) argument
387 isVertical(int gravity) argument
397 isHorizontal(int gravity) argument
412 getAbsoluteGravity(int gravity, int layoutDirection) argument
[all...]
/frameworks/base/core/java/android/view/autofill/
H A DAutofillPopupWindow.java203 public void showAsDropDown(View anchor, int xoff, int yoff, int gravity) { argument
214 attachToAnchor(anchor, xoff, yoff, gravity);
218 p.width, p.height, gravity, getAllowScrollingAnchorParent());
227 protected void attachToAnchor(View anchor, int xoff, int yoff, int gravity) { argument
228 super.attachToAnchor(anchor, xoff, yoff, gravity);
/frameworks/base/core/java/com/android/internal/view/menu/
H A DMenuPopupHelper.java120 * @param gravity alignment of the popup relative to the anchor
122 public void setGravity(int gravity) { argument
123 mDropDownGravity = gravity;
181 * If the popup's resolved gravity is {@link Gravity#LEFT}, this will
183 * anchor view. If the resolved gravity is {@link Gravity#RIGHT}, the
253 // If the resolved drop-down gravity is RIGHT, the popup's right
H A DStandardMenuPopup.java141 public void setGravity(int gravity) { argument
142 mDropDownGravity = gravity;
/frameworks/base/test-runner/src/android/test/
H A DTouchUtils.java484 * Get the location of a view. Use the gravity param to specify which part of the view to
488 * @param gravity A combination of (TOP, CENTER_VERTICAL, BOTTOM) and (LEFT, CENTER_HORIZONTAL,
492 private static void getStartLocation(View v, int gravity, int[] xy) { argument
498 switch (gravity & Gravity.VERTICAL_GRAVITY_MASK) {
511 switch (gravity & Gravity.HORIZONTAL_GRAVITY_MASK) {
530 * @param gravity Which part of the view to use for the initial down event. A combination of
542 public static int dragViewBy(ActivityInstrumentationTestCase test, View v, int gravity, argument
544 return dragViewBy((InstrumentationTestCase) test, v, gravity, deltaX, deltaY);
552 * @param gravity Which part of the view to use for the initial down event. A combination of
564 public static int dragViewBy(InstrumentationTestCase test, View v, int gravity, in argument
597 dragViewTo(ActivityInstrumentationTestCase test, View v, int gravity, int toX, int toY) argument
614 dragViewTo(InstrumentationTestCase test, View v, int gravity, int toX, int toY) argument
648 dragViewToX(ActivityInstrumentationTestCase test, View v, int gravity, int toX) argument
664 dragViewToX(InstrumentationTestCase test, View v, int gravity, int toX) argument
695 dragViewToY(ActivityInstrumentationTestCase test, View v, int gravity, int toY) argument
711 dragViewToY(InstrumentationTestCase test, View v, int gravity, int toY) argument
[all...]
/frameworks/support/v7/appcompat/src/android/support/v7/view/menu/
H A DMenuPopupHelper.java127 * @param gravity alignment of the popup relative to the anchor
129 public void setGravity(int gravity) { argument
130 mDropDownGravity = gravity;
188 * If the popup's resolved gravity is {@link Gravity#LEFT}, this will
190 * anchor view. If the resolved gravity is {@link Gravity#RIGHT}, the
265 // If the resolved drop-down gravity is RIGHT, the popup's right
/frameworks/support/wear/src/android/support/wear/widget/
H A DBoxInsetLayout.java251 int gravity = lp.gravity;
252 if (gravity == -1) {
253 gravity = DEFAULT_CHILD_GRAVITY;
257 final int absoluteGravity = Gravity.getAbsoluteGravity(gravity, layoutDirection);
258 final int verticalGravity = gravity & Gravity.VERTICAL_GRAVITY_MASK;
259 final int horizontalGravity = gravity & Gravity.HORIZONTAL_GRAVITY_MASK;
262 // If the child's width is match_parent then we can ignore gravity.
283 // If the child's height is match_parent then we can ignore gravity.
323 int gravity
478 LayoutParams(int width, int height, int gravity) argument
483 LayoutParams(int width, int height, int gravity, @BoxedEdges int boxed) argument
[all...]

Completed in 696 milliseconds

123