Home
last modified time | relevance | path

Searched refs:gravity (Results 1 – 25 of 109) sorted by relevance

12345

/frameworks/base/core/java/android/view/
DGravity.java138 public static void apply(int gravity, int w, int h, Rect container, Rect outRect) { in apply() argument
139 apply(gravity, w, h, container, 0, 0, outRect); in apply()
159 public static void apply(int gravity, int w, int h, Rect container, in apply() argument
161 int absGravity = getAbsoluteGravity(gravity, layoutDirection); in apply()
186 public static void apply(int gravity, int w, int h, Rect container, in apply() argument
188 switch (gravity&((AXIS_PULL_BEFORE|AXIS_PULL_AFTER)<<AXIS_X_SHIFT)) { in apply()
193 if ((gravity&(AXIS_CLIP<<AXIS_X_SHIFT)) in apply()
206 if ((gravity&(AXIS_CLIP<<AXIS_X_SHIFT)) in apply()
216 if ((gravity&(AXIS_CLIP<<AXIS_X_SHIFT)) in apply()
229 switch (gravity&((AXIS_PULL_BEFORE|AXIS_PULL_AFTER)<<AXIS_Y_SHIFT)) { in apply()
[all …]
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/android/support/
DDrawerLayoutUtil.java42 int gravity = -1; in openDrawer() local
44 gravity = LEFT; in openDrawer()
46 gravity = RIGHT; in openDrawer()
48 gravity = START; in openDrawer()
50 gravity = END; in openDrawer()
52 if (gravity > 0) { in openDrawer()
53 openDrawer(drawerLayout, gravity); in openDrawer()
57 private static void openDrawer(View drawerLayout, int gravity) { in openDrawer() argument
60 gravity); in openDrawer() local
/frameworks/base/test-runner/src/android/test/
DTouchUtils.java492 private static void getStartLocation(View v, int gravity, int[] xy) { in getStartLocation() argument
498 switch (gravity & Gravity.VERTICAL_GRAVITY_MASK) { in getStartLocation()
511 switch (gravity & Gravity.HORIZONTAL_GRAVITY_MASK) { in getStartLocation()
542 public static int dragViewBy(ActivityInstrumentationTestCase test, View v, int gravity, in dragViewBy() argument
544 return dragViewBy((InstrumentationTestCase) test, v, gravity, deltaX, deltaY); in dragViewBy()
564 public static int dragViewBy(InstrumentationTestCase test, View v, int gravity, int deltaX, in dragViewBy() argument
568 getStartLocation(v, gravity, xy); in dragViewBy()
597 public static int dragViewTo(ActivityInstrumentationTestCase test, View v, int gravity, int toX, in dragViewTo() argument
599 return dragViewTo((InstrumentationTestCase) test, v, gravity, toX, toY); in dragViewTo()
614 public static int dragViewTo(InstrumentationTestCase test, View v, int gravity, int toX, in dragViewTo() argument
[all …]
/frameworks/base/core/java/android/app/
DActionBar.java1381 public int gravity = Gravity.NO_GRAVITY; field in ActionBar.LayoutParams
1388 gravity = a.getInt( in LayoutParams()
1396 this.gravity = Gravity.CENTER_VERTICAL | Gravity.START; in LayoutParams()
1399 public LayoutParams(int width, int height, int gravity) { in LayoutParams() argument
1402 this.gravity = gravity; in LayoutParams()
1405 public LayoutParams(int gravity) { in LayoutParams() argument
1406 this(WRAP_CONTENT, MATCH_PARENT, gravity); in LayoutParams()
1411 this.gravity = source.gravity; in LayoutParams()
1433 encoder.addProperty("gravity", gravity); in encodeProperties()
/frameworks/base/packages/CarSystemUI/src/com/android/systemui/statusbar/hvac/
DAnimatedTemperatureView.java66 static boolean isHorizontal(int gravity) { in isHorizontal() argument
67 return Gravity.isHorizontal(gravity) in isHorizontal()
68 && (gravity & Gravity.HORIZONTAL_GRAVITY_MASK) != Gravity.CENTER_HORIZONTAL; in isHorizontal()
72 static boolean isLeft(int gravity, int layoutDirection) { in isLeft() argument
74 .getAbsoluteGravity(gravity & Gravity.HORIZONTAL_GRAVITY_MASK, layoutDirection) in isLeft()
78 static boolean isVertical(int gravity) { in isVertical() argument
79 return Gravity.isVertical(gravity) in isVertical()
80 && (gravity & Gravity.VERTICAL_GRAVITY_MASK) != Gravity.CENTER_VERTICAL; in isVertical()
83 static boolean isTop(int gravity) { in isTop() argument
84 return (gravity & Gravity.VERTICAL_GRAVITY_MASK) == Gravity.TOP; in isTop()
DTemperatureBackgroundAnimator.java87 private void setupAnimations(int gravity, int pivotOffset, Rect paddingRect, in setupAnimations() argument
90 if (isHorizontal(gravity)) { in setupAnimations()
92 if (isLeft(gravity, mAnimatedView.getLayoutDirection())) { in setupAnimations()
101 } else if (isVertical(gravity)) { in setupAnimations()
103 if (isTop(gravity)) { in setupAnimations()
DTemperatureTextAnimator.java108 private void setupAnimations(int gravity) { in setupAnimations() argument
111 if (!isHorizontal(gravity)) { in setupAnimations()
117 boolean isLeft = isLeft(gravity, mTextSwitcher.getLayoutDirection()); in setupAnimations()
/frameworks/base/core/java/android/widget/
DPopupMenu.java77 public PopupMenu(Context context, View anchor, int gravity) { in PopupMenu() argument
78 this(context, anchor, gravity, R.attr.popupMenuStyle, 0); in PopupMenu()
98 public PopupMenu(Context context, View anchor, int gravity, int popupStyleAttr, in PopupMenu() argument
119 mPopup.setGravity(gravity); in PopupMenu()
139 public void setGravity(int gravity) { in setGravity() argument
140 mPopup.setGravity(gravity); in setGravity()
DFrameLayout.java293 int gravity = lp.gravity; in layoutChildren() local
294 if (gravity == -1) { in layoutChildren()
295 gravity = DEFAULT_CHILD_GRAVITY; in layoutChildren()
299 final int absoluteGravity = Gravity.getAbsoluteGravity(gravity, layoutDirection); in layoutChildren()
300 final int verticalGravity = gravity & Gravity.VERTICAL_GRAVITY_MASK; in layoutChildren()
449 public int gravity = UNSPECIFIED_GRAVITY; field in FrameLayout.LayoutParams
455 gravity = a.getInt(R.styleable.FrameLayout_Layout_layout_gravity, UNSPECIFIED_GRAVITY); in LayoutParams()
475 public LayoutParams(int width, int height, int gravity) { in LayoutParams() argument
477 this.gravity = gravity; in LayoutParams()
497 this.gravity = source.gravity; in LayoutParams()
DLinearLayout.java1248 final int gravity = (lp.gravity < 0 ? mGravity : lp.gravity) in measureHorizontal() local
1250 final int index = ((gravity >> Gravity.AXIS_Y_SHIFT) in measureHorizontal()
1414 final int gravity = (lp.gravity < 0 ? mGravity : lp.gravity) in measureHorizontal() local
1416 final int index = ((gravity >> Gravity.AXIS_Y_SHIFT) in measureHorizontal()
1646 int gravity = lp.gravity; in layoutVertical() local
1647 if (gravity < 0) { in layoutVertical()
1648 gravity = minorGravity; in layoutVertical()
1651 final int absoluteGravity = Gravity.getAbsoluteGravity(gravity, layoutDirection); in layoutVertical()
1772 int gravity = lp.gravity; in layoutHorizontal() local
1773 if (gravity < 0) { in layoutHorizontal()
[all …]
DPopupWindow.java1306 public void showAtLocation(View parent, int gravity, int x, int y) { in showAtLocation() argument
1308 showAtLocation(parent.getWindowToken(), gravity, x, y); in showAtLocation() local
1323 public void showAtLocation(IBinder token, int gravity, int x, int y) { in showAtLocation() argument
1334 mGravity = gravity; in showAtLocation()
1402 public void showAsDropDown(View anchor, int xoff, int yoff, int gravity) { in showAsDropDown() argument
1409 attachToAnchor(anchor, xoff, yoff, gravity); in showAsDropDown()
1419 p.width, p.height, gravity, mAllowScrollingAnchorParent); in showAsDropDown()
1593 int gravity = mGravity == Gravity.NO_GRAVITY ? Gravity.START | Gravity.TOP : mGravity; in computeGravity() local
1595 gravity |= Gravity.DISPLAY_CLIP_VERTICAL; in computeGravity()
1597 return gravity; in computeGravity()
[all …]
DToast.java227 public void setGravity(int gravity, int xOffset, int yOffset) { in setGravity() argument
228 mTN.mGravity = gravity; in setGravity()
488 … final int gravity = Gravity.getAbsoluteGravity(mGravity, config.getLayoutDirection()); in handleShow() local
489 mParams.gravity = gravity; in handleShow()
490 if ((gravity & Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.FILL_HORIZONTAL) { in handleShow()
493 if ((gravity & Gravity.VERTICAL_GRAVITY_MASK) == Gravity.FILL_VERTICAL) { in handleShow()
DToolbar.java1180 lp.gravity = Gravity.END | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureMenuView()
1498 lp.gravity = Gravity.START | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureNavButtonView()
1509 lp.gravity = Gravity.START | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureCollapseButtonView()
2087 switch (getChildVerticalGravity(lp.gravity)) { in getChildTop()
2115 private int getChildVerticalGravity(int gravity) { in getChildVerticalGravity() argument
2116 final int vgrav = gravity & Gravity.VERTICAL_GRAVITY_MASK; in getChildVerticalGravity()
2134 private void addCustomViewsWithGravity(List<View> views, int gravity) { in addCustomViewsWithGravity() argument
2137 final int absGrav = Gravity.getAbsoluteGravity(gravity, getLayoutDirection()); in addCustomViewsWithGravity()
2146 getChildHorizontalGravity(lp.gravity) == absGrav) { in addCustomViewsWithGravity()
2155 getChildHorizontalGravity(lp.gravity) == absGrav) { in addCustomViewsWithGravity()
[all …]
DRelativeLayout.java339 public void setGravity(int gravity) { in setGravity() argument
340 if (mGravity != gravity) { in setGravity()
341 if ((gravity & Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK) == 0) { in setGravity()
342 gravity |= Gravity.START; in setGravity()
345 if ((gravity & Gravity.VERTICAL_GRAVITY_MASK) == 0) { in setGravity()
346 gravity |= Gravity.TOP; in setGravity()
349 mGravity = gravity; in setGravity()
356 final int gravity = horizontalGravity & Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK; in setHorizontalGravity() local
357 if ((mGravity & Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK) != gravity) { in setHorizontalGravity()
358 mGravity = (mGravity & ~Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK) | gravity; in setHorizontalGravity()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DHardwareUiLayout.java268 p.gravity = rotateGravityRight(p.gravity); in rotateRight()
272 separatedViewLayoutParams.gravity = rotateGravityRight(separatedViewLayoutParams.gravity); in rotateRight()
286 private int rotateGravityRight(int gravity) { in rotateGravityRight() argument
289 final int absoluteGravity = Gravity.getAbsoluteGravity(gravity, layoutDirection); in rotateGravityRight()
290 final int verticalGravity = gravity & Gravity.VERTICAL_GRAVITY_MASK; in rotateGravityRight()
326 p.gravity = rotateGravityLeft(p.gravity); in rotateLeft()
330 separatedViewLayoutParams.gravity = rotateGravityLeft(separatedViewLayoutParams.gravity); in rotateLeft()
336 private int rotateGravityLeft(int gravity) { in rotateGravityLeft() argument
337 if (gravity == -1) { in rotateGravityLeft()
338 gravity = Gravity.TOP | Gravity.START; in rotateGravityLeft()
[all …]
DSizeCompatModeActivityController.java198 mWinParams.gravity = getGravity(getResources().getConfiguration().getLayoutDirection()); in RestartActivityButton()
256 int gravity = getGravity(layoutDirection); in setLayoutDirection() local
257 if (mWinParams.gravity != gravity) { in setLayoutDirection()
258 mWinParams.gravity = gravity; in setLayoutDirection()
288 popupWindow.showAtLocation(this, mWinParams.gravity, mPopupOffsetX, mPopupOffsetY); in showHint()
/frameworks/base/core/java/android/inputmethodservice/
DSoftInputWindow.java130 int windowType, int gravity, boolean takesFocus) { in SoftInputWindow() argument
137 mGravity = gravity; in SoftInputWindow()
174 public void setGravity(int gravity) { in setGravity() argument
176 lp.gravity = gravity; in setGravity()
182 return getWindow().getAttributes().gravity; in getGravity()
186 if (lp.gravity == Gravity.TOP || lp.gravity == Gravity.BOTTOM) { in updateWidthHeight()
237 lp.gravity = mGravity; in initDockWindow()
/frameworks/base/core/java/android/view/autofill/
DAutofillPopupWindow.java248 int xOffset, int yOffset, int width, int height, int gravity, boolean allowScroll) { in findDropDownPosition() argument
255 outParams.gravity = gravity; in findDropDownPosition()
259 width, height, gravity, allowScroll); in findDropDownPosition()
263 public void showAsDropDown(View anchor, int xoff, int yoff, int gravity) { in showAsDropDown() argument
274 attachToAnchor(anchor, xoff, yoff, gravity); in showAsDropDown()
278 p.width, p.height, gravity, getAllowScrollingAnchorParent()); in showAsDropDown()
287 protected void attachToAnchor(View anchor, int xoff, int yoff, int gravity) { in attachToAnchor() argument
288 super.attachToAnchor(anchor, xoff, yoff, gravity); in attachToAnchor()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DScreenDecorWindowTests.java187 private View createDecorWindow(int gravity, int width, int height) { in createDecorWindow() argument
188 return createWindow("decorWindow", gravity, width, height, RED, in createDecorWindow()
192 private View createWindow(String name, int gravity, int width, int height, int color, int flags, in createWindow() argument
203 lp.gravity = gravity; in createWindow()
218 private void updateWindow(View v, int gravity, int width, int height, in updateWindow() argument
223 lp.gravity = gravity; in updateWindow()
DWindowFrameTests.java133 w.mAttrs.gravity = Gravity.LEFT | Gravity.TOP; in testLayoutInFullscreenTaskInsets()
190 w.mAttrs.gravity = Gravity.LEFT | Gravity.TOP; in testLayoutInFullscreenTaskNoInsets()
251 w.mAttrs.gravity = Gravity.RIGHT | Gravity.TOP; in testLayoutInFullscreenTaskNoInsets()
254 w.mAttrs.gravity = Gravity.RIGHT | Gravity.BOTTOM; in testLayoutInFullscreenTaskNoInsets()
281 w.mAttrs.gravity = Gravity.LEFT | Gravity.TOP; in testLayoutNonfullscreenTask()
330 w.mAttrs.gravity = Gravity.LEFT | Gravity.TOP; in testCalculatePolicyCrop()
363 w.mAttrs.gravity = Gravity.LEFT | Gravity.TOP; in testCalculatePolicyCrop()
399 w.mAttrs.gravity = Gravity.LEFT | Gravity.TOP; in testLayoutLetterboxedWindow()
432 w.mAttrs.gravity = Gravity.LEFT | Gravity.TOP; in testDisplayCutout()
459 w.mAttrs.gravity = Gravity.LEFT | Gravity.TOP; in testDisplayCutout_tempDisplayedBounds()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DFloatingRotationButton.java89 lp.gravity = Gravity.BOTTOM | Gravity.LEFT; in show()
92 lp.gravity = Gravity.BOTTOM | Gravity.RIGHT; in show()
95 lp.gravity = Gravity.TOP | Gravity.RIGHT; in show()
98 lp.gravity = Gravity.TOP | Gravity.LEFT; in show()
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/
DRecentsOnboarding.java403 final int gravity; in show() local
406 gravity = Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL; in show()
411 gravity = Gravity.BOTTOM | (layoutDirection == View.LAYOUT_DIRECTION_LTR in show()
416 mWindowManager.addView(mLayout, getWindowLayoutParams(gravity, x)); in show()
482 private WindowManager.LayoutParams getWindowLayoutParams(int gravity, int x) { in getWindowLayoutParams() argument
494 lp.gravity = gravity; in getWindowLayoutParams()
/frameworks/base/core/java/android/content/pm/
DActivityInfo.java1172 + windowLayout.heightFraction + ", " + windowLayout.gravity); in dump()
1222 dest.writeInt(windowLayout.gravity); in writeToParcel()
1372 … public WindowLayout(int width, float widthFraction, int height, float heightFraction, int gravity, in WindowLayout() argument
1378 this.gravity = gravity; in WindowLayout()
1388 gravity = source.readInt(); in WindowLayout()
1430 public final int gravity; field in ActivityInfo.WindowLayout
/frameworks/base/tools/processors/view_inspector/test/resources/android/processor/view/inspector/InspectionCompanionGeneratorTest/
DSimpleProperties.java.txt52 * Property ID of {@code gravity}.
89 mGravityId = propertyMapper.mapGravity("gravity", R.attr.gravity);
/frameworks/base/services/core/java/com/android/server/wm/utils/
DWmDisplayCutout.java135 private static int findInsetForSide(Size display, List<Rect> boundingRects, int gravity) { in findInsetForSide() argument
140 switch (gravity) { in findInsetForSide()
162 throw new IllegalArgumentException("unknown gravity: " + gravity); in findInsetForSide()

12345