Home
last modified time | relevance | path

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

1234567

/frameworks/base/core/java/android/view/
DGravity.java170 public static void apply(int gravity, int w, int h, Rect container, Rect outRect) { in apply() argument
171 apply(gravity, w, h, container, 0, 0, outRect); in apply()
191 public static void apply(int gravity, int w, int h, @NonNull Rect container, in apply() argument
193 int absGravity = getAbsoluteGravity(gravity, layoutDirection); in apply()
218 public static void apply(int gravity, int w, int h, @NonNull Rect container, in apply() argument
220 switch (gravity&((AXIS_PULL_BEFORE|AXIS_PULL_AFTER)<<AXIS_X_SHIFT)) { in apply()
225 if ((gravity&(AXIS_CLIP<<AXIS_X_SHIFT)) in apply()
238 if ((gravity&(AXIS_CLIP<<AXIS_X_SHIFT)) in apply()
248 if ((gravity&(AXIS_CLIP<<AXIS_X_SHIFT)) in apply()
261 switch (gravity&((AXIS_PULL_BEFORE|AXIS_PULL_AFTER)<<AXIS_Y_SHIFT)) { in apply()
[all …]
DCutoutSpecification.java308 private int computeSafeInsets(int gravity, Rect rect) {
309 if (gravity == LEFT && rect.right > 0 && rect.right < mPhysicalDisplayWidth) {
311 } else if (gravity == TOP && rect.bottom > 0 && rect.bottom < mPhysicalDisplayHeight) {
313 } else if (gravity == RIGHT && rect.left > 0 && rect.left < mPhysicalDisplayWidth) {
315 } else if (gravity == BOTTOM && rect.top > 0 && rect.top < mPhysicalDisplayHeight) {
321 private void setSafeInset(int gravity, int inset) {
322 if (gravity == LEFT) {
324 } else if (gravity == TOP) {
326 } else if (gravity == RIGHT) {
328 } else if (gravity == BOTTOM) {
[all …]
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/tv/
DTvPipKeepClearAlgorithmTest.kt53 private var gravity: Int = 0 variable in com.android.wm.shell.pip.tv.TvPipKeepClearAlgorithmTest
63 gravity = Gravity.BOTTOM or Gravity.RIGHT in setup()
70 algorithm.setGravity(gravity) in setup()
76 gravity = Gravity.BOTTOM or Gravity.RIGHT in testAnchorPosition_BottomRight()
82 gravity = Gravity.TOP or Gravity.RIGHT in testAnchorPosition_TopRight()
88 gravity = Gravity.TOP or Gravity.LEFT in testAnchorPosition_TopLeft()
94 gravity = Gravity.BOTTOM or Gravity.LEFT in testAnchorPosition_BottomLeft()
100 gravity = Gravity.RIGHT in testAnchorPosition_Right()
106 gravity = Gravity.LEFT in testAnchorPosition_Left()
112 gravity = Gravity.TOP in testAnchorPosition_Top()
[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/packages/SystemUI/tests/src/com/android/systemui/navigationbar/gestural/
DFloatingRotationButtonPositionCalculatorTest.kt75 gravity = Gravity.BOTTOM or Gravity.LEFT,
86 gravity = Gravity.BOTTOM or Gravity.RIGHT,
97 gravity = Gravity.TOP or Gravity.RIGHT,
108 gravity = Gravity.TOP or Gravity.LEFT,
119 gravity = Gravity.BOTTOM or Gravity.LEFT,
130 gravity = Gravity.BOTTOM or Gravity.LEFT,
141 gravity = Gravity.BOTTOM or Gravity.RIGHT,
154 gravity = Gravity.BOTTOM or Gravity.RIGHT,
165 gravity = Gravity.TOP or Gravity.RIGHT,
176 gravity = Gravity.TOP or Gravity.LEFT,
[all …]
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/rotation/
DFloatingRotationButtonPositionCalculator.kt26 val gravity = resolveGravity(currentRotation) in calculatePosition() constant
32 if (gravity and Gravity.RIGHT == Gravity.RIGHT) { in calculatePosition()
38 if (gravity and Gravity.BOTTOM == Gravity.BOTTOM) { in calculatePosition()
45 gravity = gravity, in calculatePosition()
52 val gravity: Int, constant in com.android.systemui.shared.rotation.FloatingRotationButtonPositionCalculator.Position
/frameworks/base/test-runner/src/android/test/
DTouchUtils.java510 private static void getStartLocation(View v, int gravity, int[] xy) { in getStartLocation() argument
516 switch (gravity & Gravity.VERTICAL_GRAVITY_MASK) { in getStartLocation()
529 switch (gravity & Gravity.HORIZONTAL_GRAVITY_MASK) { in getStartLocation()
560 public static int dragViewBy(ActivityInstrumentationTestCase test, View v, int gravity, in dragViewBy() argument
562 return dragViewBy((InstrumentationTestCase) test, v, gravity, deltaX, deltaY); in dragViewBy()
582 public static int dragViewBy(InstrumentationTestCase test, View v, int gravity, int deltaX, in dragViewBy() argument
586 getStartLocation(v, gravity, xy); in dragViewBy()
615 public static int dragViewTo(ActivityInstrumentationTestCase test, View v, int gravity, int toX, in dragViewTo() argument
617 return dragViewTo((InstrumentationTestCase) test, v, gravity, toX, toY); in dragViewTo()
632 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/core/java/android/widget/
DPopupMenu.java78 public PopupMenu(Context context, View anchor, int gravity) { in PopupMenu() argument
79 this(context, anchor, gravity, R.attr.popupMenuStyle, 0); in PopupMenu()
99 public PopupMenu(Context context, View anchor, int gravity, int popupStyleAttr, in PopupMenu() argument
120 mPopup.setGravity(gravity); in PopupMenu()
140 public void setGravity(int gravity) { in setGravity() argument
141 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()
DToastPresenter.java161 int duration, int gravity, int xOffset, int yOffset, float horizontalMargin, in adjustLayoutParams() argument
164 int absGravity = Gravity.getAbsoluteGravity(gravity, config.getLayoutDirection()); in adjustLayoutParams()
165 params.gravity = absGravity; in adjustLayoutParams()
191 float verticalMargin, int gravity) { in updateLayoutParams() argument
194 mParams.gravity = Gravity.getAbsoluteGravity(gravity, config.getLayoutDirection()); in updateLayoutParams()
232 public void show(View view, IBinder token, IBinder windowToken, int duration, int gravity, in show() argument
235 show(view, token, windowToken, duration, gravity, xOffset, yOffset, horizontalMargin, in show()
243 public void show(View view, IBinder token, IBinder windowToken, int duration, int gravity, in show() argument
250 adjustLayoutParams(mParams, windowToken, duration, gravity, xOffset, yOffset, in show()
DLinearLayout.java1284 final int gravity = (lp.gravity < 0 ? mGravity : lp.gravity) in measureHorizontal() local
1286 final int index = ((gravity >> Gravity.AXIS_Y_SHIFT) in measureHorizontal()
1466 final int gravity = (lp.gravity < 0 ? mGravity : lp.gravity) in measureHorizontal() local
1468 final int index = ((gravity >> Gravity.AXIS_Y_SHIFT) in measureHorizontal()
1702 int gravity = lp.gravity; in layoutVertical() local
1703 if (gravity < 0) { in layoutVertical()
1704 gravity = minorGravity; in layoutVertical()
1707 final int absoluteGravity = Gravity.getAbsoluteGravity(gravity, layoutDirection); in layoutVertical()
1828 int gravity = lp.gravity; in layoutHorizontal() local
1829 if (gravity < 0) { in layoutHorizontal()
[all …]
DPopupWindow.java1311 public void showAtLocation(View parent, int gravity, int x, int y) { in showAtLocation() argument
1313 showAtLocation(parent.getWindowToken(), gravity, x, y); in showAtLocation() local
1328 public void showAtLocation(IBinder token, int gravity, int x, int y) { in showAtLocation() argument
1339 mGravity = gravity; in showAtLocation()
1407 public void showAsDropDown(View anchor, int xoff, int yoff, int gravity) { in showAsDropDown() argument
1414 attachToAnchor(anchor, xoff, yoff, gravity); in showAsDropDown()
1424 p.width, p.height, gravity, mAllowScrollingAnchorParent); in showAsDropDown()
1598 int gravity = mGravity == Gravity.NO_GRAVITY ? Gravity.START | Gravity.TOP : mGravity; in computeGravity() local
1600 gravity |= Gravity.DISPLAY_CLIP_VERTICAL; in computeGravity()
1602 return gravity; in computeGravity()
[all …]
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.java340 public void setGravity(int gravity) { in setGravity() argument
341 if (mGravity != gravity) { in setGravity()
342 if ((gravity & Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK) == 0) { in setGravity()
343 gravity |= Gravity.START; in setGravity()
346 if ((gravity & Gravity.VERTICAL_GRAVITY_MASK) == 0) { in setGravity()
347 gravity |= Gravity.TOP; in setGravity()
350 mGravity = gravity; in setGravity()
357 final int gravity = horizontalGravity & Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK; in setHorizontalGravity() local
358 if ((mGravity & Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK) != gravity) { in setHorizontalGravity()
359 mGravity = (mGravity & ~Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK) | gravity; in setHorizontalGravity()
[all …]
/frameworks/base/core/java/android/view/autofill/
DAutofillPopupWindow.java250 int xOffset, int yOffset, int width, int height, int gravity, boolean allowScroll) { in findDropDownPosition() argument
257 outParams.gravity = gravity; in findDropDownPosition()
261 width, height, gravity, allowScroll); in findDropDownPosition()
265 public void showAsDropDown(View anchor, int xoff, int yoff, int gravity) { in showAsDropDown() argument
276 attachToAnchor(anchor, xoff, yoff, gravity); in showAsDropDown()
280 p.width, p.height, gravity, getAllowScrollingAnchorParent()); in showAsDropDown()
289 protected void attachToAnchor(View anchor, int xoff, int yoff, int gravity) { in attachToAnchor() argument
290 super.attachToAnchor(anchor, xoff, yoff, gravity); in attachToAnchor()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/
DButtonPreferenceTest.java107 assertThat(lp.gravity).isEqualTo(Gravity.START); in onBindViewHolder_default_shouldReturnButtonGravityStart()
118 assertThat(lp.gravity).isEqualTo(Gravity.START); in onBindViewHolder_setGravityStart_shouldReturnButtonGravityStart()
129 assertThat(lp.gravity).isEqualTo(Gravity.CENTER_HORIZONTAL); in onBindViewHolder_setGravityCenter_shouldReturnButtonGravityCenterHorizontal()
133 assertThat(lp.gravity).isEqualTo(Gravity.CENTER_HORIZONTAL); in onBindViewHolder_setGravityCenter_shouldReturnButtonGravityCenterHorizontal()
137 assertThat(lp.gravity).isEqualTo(Gravity.CENTER_HORIZONTAL); in onBindViewHolder_setGravityCenter_shouldReturnButtonGravityCenterHorizontal()
148 assertThat(lp.gravity).isEqualTo(Gravity.START); in onBindViewHolder_setUnsupportedGravity_shouldReturnButtonGravityStart()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/
DPipMenuIconsAlgorithm.java66 protected static void setLayoutGravity(View v, int gravity) { in setLayoutGravity() argument
69 params.gravity = gravity; in setLayoutGravity()
/frameworks/base/packages/SettingsLib/ButtonPreference/src/com/android/settingslib/widget/
DButtonPreference.java188 public void setGravity(@GravityInt int gravity) { in setGravity() argument
189 if (gravity == Gravity.CENTER_HORIZONTAL || gravity == Gravity.CENTER_VERTICAL in setGravity()
190 || gravity == Gravity.CENTER) { in setGravity()
198 lp.gravity = mGravity; in setGravity()
/frameworks/base/core/java/android/service/voice/
DVoiceInteractionWindow.java147 int windowType, int gravity, boolean takesFocus) { in VoiceInteractionWindow() argument
154 mGravity = gravity; in VoiceInteractionWindow()
182 if (lp.gravity == Gravity.TOP || lp.gravity == Gravity.BOTTOM) { in updateWidthHeight()
238 lp.gravity = mGravity; in initDockWindow()
/frameworks/base/core/java/com/android/internal/view/inline/
DInlineTooltipUi.java223 int xOffset, int yOffset, int width, int height, int gravity, boolean allowScroll) { in findDropDownPosition() argument
225 height, gravity, allowScroll); in findDropDownPosition()
253 public void showAsDropDown(View anchor, int xoff, int yoff, int gravity) { in showAsDropDown() argument
260 attachToAnchor(anchor, xoff, yoff, gravity); in showAsDropDown()
264 p.width, p.height, gravity, getAllowScrollingAnchorParent()); in showAsDropDown()
272 protected void attachToAnchor(View anchor, int xoff, int yoff, int gravity) { in attachToAnchor() argument
273 super.attachToAnchor(anchor, xoff, yoff, gravity); in attachToAnchor()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/
DTvPipMenuView.java341 params.gravity = buttonGravity; in updateButtonGravity()
448 void showMoveMenu(int gravity) {
455 showMovementHints(gravity);
681 public void showMovementHints(int gravity) { in showMovementHints() argument
684 "%s: showMovementHints(), position: %s", TAG, Gravity.toString(gravity)); in showMovementHints()
687 animateAlphaTo(checkGravity(gravity, Gravity.BOTTOM) ? 1f : 0f, mArrowUp); in showMovementHints()
688 animateAlphaTo(checkGravity(gravity, Gravity.TOP) ? 1f : 0f, mArrowDown); in showMovementHints()
689 animateAlphaTo(checkGravity(gravity, Gravity.RIGHT) ? 1f : 0f, mArrowLeft); in showMovementHints()
690 animateAlphaTo(checkGravity(gravity, Gravity.LEFT) ? 1f : 0f, mArrowRight); in showMovementHints()
693 private boolean checkGravity(int gravity, int feature) { in checkGravity() argument
[all …]
/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/core/java/android/content/pm/
DActivityInfo.java1841 + windowLayout.heightFraction + ", " + windowLayout.gravity); in dump()
2048 int gravity, int minWidth, int minHeight) { in WindowLayout() argument
2049 this(width, widthFraction, height, heightFraction, gravity, minWidth, minHeight, in WindowLayout()
2055 int gravity, int minWidth, int minHeight, String windowLayoutAffinity) { in WindowLayout() argument
2060 this.gravity = gravity; in WindowLayout()
2072 gravity = source.readInt(); in WindowLayout()
2115 public final int gravity; field in ActivityInfo.WindowLayout
2164 dest.writeInt(gravity); in writeToParcel()
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/
DMockView.java114 public void setGravity(int gravity) { in setGravity() argument
115 mView.setGravity(gravity); in setGravity()

1234567