Home
last modified time | relevance | path

Searched refs:Gravity (Results 1 – 25 of 308) sorted by relevance

12345678910>>...13

/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/tv/
DTvPipGravityTest.java26 import android.view.Gravity;
103 checkGravity(mTvPipBoundsState.getDefaultGravity(), Gravity.RIGHT | Gravity.BOTTOM); in regularPip_defaultGravity()
108 checkGravity(mTvPipBoundsState.getTvPipGravity(), Gravity.RIGHT | Gravity.BOTTOM); in regularPip_defaultTvPipGravity()
114 checkGravity(mTvPipBoundsState.getDefaultGravity(), Gravity.LEFT | Gravity.BOTTOM); in regularPip_defaultGravity_RTL()
122 assertGravityAfterExpansion(Gravity.BOTTOM | Gravity.RIGHT, in updateGravity_expand_vertical()
123 Gravity.CENTER_VERTICAL | Gravity.RIGHT); in updateGravity_expand_vertical()
124 assertGravityAfterExpansion(Gravity.TOP | Gravity.RIGHT, in updateGravity_expand_vertical()
125 Gravity.CENTER_VERTICAL | Gravity.RIGHT); in updateGravity_expand_vertical()
126 assertGravityAfterExpansion(Gravity.BOTTOM | Gravity.LEFT, in updateGravity_expand_vertical()
127 Gravity.CENTER_VERTICAL | Gravity.LEFT); in updateGravity_expand_vertical()
[all …]
DTvPipKeepClearAlgorithmTest.kt23 import android.view.Gravity
68 gravity = Gravity.BOTTOM or Gravity.RIGHT in setup()
82 gravity = Gravity.BOTTOM or Gravity.RIGHT in testAnchorPosition_BottomRight()
89 gravity = Gravity.TOP or Gravity.RIGHT in testAnchorPosition_TopRight()
96 gravity = Gravity.TOP or Gravity.LEFT in testAnchorPosition_TopLeft()
103 gravity = Gravity.BOTTOM or Gravity.LEFT in testAnchorPosition_BottomLeft()
110 gravity = Gravity.RIGHT in testAnchorPosition_Right()
117 gravity = Gravity.LEFT in testAnchorPosition_Left()
124 gravity = Gravity.TOP in testAnchorPosition_Top()
131 gravity = Gravity.BOTTOM in testAnchorPosition_Bottom()
[all …]
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/rotation/
DFloatingRotationButtonPositionCalculator.kt3 import android.view.Gravity
32 if (gravity and Gravity.RIGHT == Gravity.RIGHT) { in calculatePosition()
38 if (gravity and Gravity.BOTTOM == Gravity.BOTTOM) { in calculatePosition()
60 Surface.ROTATION_0 -> Gravity.BOTTOM or Gravity.LEFT in resolveGravity()
61 Surface.ROTATION_90 -> Gravity.BOTTOM or Gravity.RIGHT in resolveGravity()
62 Surface.ROTATION_180 -> Gravity.TOP or Gravity.RIGHT in resolveGravity()
63 Surface.ROTATION_270 -> Gravity.TOP or Gravity.LEFT in resolveGravity()
68 Surface.ROTATION_0 -> Gravity.BOTTOM or Gravity.RIGHT
69 Surface.ROTATION_90 -> Gravity.TOP or Gravity.RIGHT
70 Surface.ROTATION_180 -> Gravity.TOP or Gravity.LEFT
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/navigationbar/gestural/
DFloatingRotationButtonPositionCalculatorTest.kt3 import android.view.Gravity
77 gravity = Gravity.BOTTOM or Gravity.LEFT,
88 gravity = Gravity.BOTTOM or Gravity.RIGHT,
99 gravity = Gravity.TOP or Gravity.RIGHT,
110 gravity = Gravity.TOP or Gravity.LEFT,
121 gravity = Gravity.BOTTOM or Gravity.LEFT,
132 gravity = Gravity.BOTTOM or Gravity.LEFT,
143 gravity = Gravity.BOTTOM or Gravity.RIGHT,
156 gravity = Gravity.BOTTOM or Gravity.RIGHT,
167 gravity = Gravity.TOP or Gravity.RIGHT,
[all …]
/frameworks/base/core/java/android/transition/
DSidePropagation.java20 import android.view.Gravity;
36 private int mSide = Gravity.BOTTOM;
124 if (mSide == Gravity.START) { in distance()
126 side = isRtl ? Gravity.RIGHT : Gravity.LEFT; in distance()
127 } else if (mSide == Gravity.END) { in distance()
129 side = isRtl ? Gravity.LEFT : Gravity.RIGHT; in distance()
135 case Gravity.LEFT: in distance()
138 case Gravity.TOP: in distance()
141 case Gravity.RIGHT: in distance()
144 case Gravity.BOTTOM: in distance()
[all …]
DSlide.java24 import android.view.Gravity;
50 private @GravityFlag int mSlideEdge = Gravity.BOTTOM;
55 @IntDef({Gravity.LEFT, Gravity.TOP, Gravity.RIGHT, Gravity.BOTTOM, Gravity.START, Gravity.END})
144 setSlideEdge(Gravity.BOTTOM); in Slide()
157 int edge = a.getInt(R.styleable.Slide_slideEdge, Gravity.BOTTOM); in Slide()
192 case Gravity.LEFT: in setSlideEdge()
195 case Gravity.TOP: in setSlideEdge()
198 case Gravity.RIGHT: in setSlideEdge()
201 case Gravity.BOTTOM: in setSlideEdge()
204 case Gravity.START: in setSlideEdge()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/globalactions/
DGlobalActionsColumnLayout.java25 import android.view.Gravity;
88 setGravity(Gravity.LEFT | Gravity.TOP); in snapToPowerButton()
92 setGravity(Gravity.RIGHT | Gravity.BOTTOM); in snapToPowerButton()
96 setGravity(Gravity.TOP | Gravity.RIGHT); in snapToPowerButton()
109 setGravity(Gravity.CENTER_HORIZONTAL | Gravity.TOP); in centerAlongEdge()
113 setGravity(Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM); in centerAlongEdge()
117 setGravity(Gravity.CENTER_VERTICAL | Gravity.RIGHT); in centerAlongEdge()
/frameworks/base/packages/SystemUI/src/com/android/systemui/decor/
DRoundedCornerDecorProviderImpl.kt22 import android.view.Gravity in <lambda>()
106 DisplayCutout.BOUNDS_POSITION_LEFT -> Gravity.LEFT in toLayoutGravity()
107 DisplayCutout.BOUNDS_POSITION_TOP -> Gravity.TOP in toLayoutGravity()
108 DisplayCutout.BOUNDS_POSITION_RIGHT -> Gravity.RIGHT in toLayoutGravity()
109 else /* DisplayCutout.BOUNDS_POSITION_BOTTOM */ -> Gravity.BOTTOM in toLayoutGravity()
112 DisplayCutout.BOUNDS_POSITION_LEFT -> Gravity.BOTTOM in toLayoutGravity()
113 DisplayCutout.BOUNDS_POSITION_TOP -> Gravity.LEFT in toLayoutGravity()
114 DisplayCutout.BOUNDS_POSITION_RIGHT -> Gravity.TOP in toLayoutGravity()
115 else /* DisplayCutout.BOUNDS_POSITION_BOTTOM */ -> Gravity.RIGHT in toLayoutGravity()
118 DisplayCutout.BOUNDS_POSITION_LEFT -> Gravity.TOP in toLayoutGravity()
[all …]
/frameworks/base/core/java/android/widget/
DLinearLayout.java29 import android.view.Gravity;
164 @ViewDebug.FlagToString(mask = Gravity.NO_GRAVITY,
165 equals = Gravity.NO_GRAVITY,name = "NONE"),
166 @ViewDebug.FlagToString(mask = Gravity.TOP,
167 equals = Gravity.TOP, name = "TOP"),
168 @ViewDebug.FlagToString(mask = Gravity.BOTTOM,
169 equals = Gravity.BOTTOM, name = "BOTTOM"),
170 @ViewDebug.FlagToString(mask = Gravity.LEFT,
171 equals = Gravity.LEFT, name = "LEFT"),
172 @ViewDebug.FlagToString(mask = Gravity.RIGHT,
[all …]
/frameworks/base/core/java/android/view/
DGravity.java30 public class Gravity class
137 Gravity.FILL,
138 Gravity.FILL_HORIZONTAL,
139 Gravity.FILL_VERTICAL,
140 Gravity.START,
141 Gravity.END,
142 Gravity.LEFT,
143 Gravity.RIGHT,
144 Gravity.TOP,
145 Gravity.BOTTOM,
[all …]
/frameworks/base/core/java/android/app/
DActionBar.java32 import android.view.Gravity;
1364 @ViewDebug.IntToString(from = Gravity.NO_GRAVITY, to = "NONE"),
1365 @ViewDebug.IntToString(from = Gravity.TOP, to = "TOP"),
1366 @ViewDebug.IntToString(from = Gravity.BOTTOM, to = "BOTTOM"),
1367 @ViewDebug.IntToString(from = Gravity.LEFT, to = "LEFT"),
1368 @ViewDebug.IntToString(from = Gravity.RIGHT, to = "RIGHT"),
1369 @ViewDebug.IntToString(from = Gravity.START, to = "START"),
1370 @ViewDebug.IntToString(from = Gravity.END, to = "END"),
1371 @ViewDebug.IntToString(from = Gravity.CENTER_VERTICAL, to = "CENTER_VERTICAL"),
1372 @ViewDebug.IntToString(from = Gravity.FILL_VERTICAL, to = "FILL_VERTICAL"),
[all …]
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/
DTvPipBoundsState.java29 import android.view.Gravity;
97 mDefaultGravity = Gravity.BOTTOM | (isRtl ? Gravity.LEFT : Gravity.RIGHT); in updateDefaultGravity()
100 int prevGravityX = mPreviousCollapsedGravity & Gravity.HORIZONTAL_GRAVITY_MASK; in updateDefaultGravity()
101 int prevGravityY = mPreviousCollapsedGravity & Gravity.VERTICAL_GRAVITY_MASK; in updateDefaultGravity()
102 if ((prevGravityX & Gravity.RIGHT) == Gravity.RIGHT) { in updateDefaultGravity()
103 mPreviousCollapsedGravity = Gravity.LEFT | prevGravityY; in updateDefaultGravity()
104 } else if ((prevGravityX & Gravity.LEFT) == Gravity.LEFT) { in updateDefaultGravity()
105 mPreviousCollapsedGravity = Gravity.RIGHT | prevGravityY; in updateDefaultGravity()
DTvPipKeepClearAlgorithm.kt23 import android.view.Gravity in <lambda>()
82 private var pipGravity = Gravity.BOTTOM or Gravity.RIGHT in <lambda>()
596 (Gravity.TOP), (Gravity.TOP or Gravity.CENTER_HORIZONTAL) -> true in <lambda>()
597 (Gravity.TOP or Gravity.LEFT) -> true in <lambda>()
598 (Gravity.LEFT), (Gravity.LEFT or Gravity.CENTER_VERTICAL) -> true in <lambda>()
599 (Gravity.BOTTOM or Gravity.LEFT) -> true in <lambda>()
606 (Gravity.TOP or Gravity.LEFT) -> true in <lambda>()
607 (Gravity.TOP or Gravity.RIGHT) -> true in <lambda>()
613 val horizontalGravity = pipGravity and Gravity.HORIZONTAL_GRAVITY_MASK in <lambda>()
614 val leftOrRight = horizontalGravity == Gravity.LEFT || horizontalGravity == Gravity.RIGHT in <lambda>()
[all …]
DTvPipBoundsAlgorithm.java32 import android.view.Gravity;
141 Gravity.apply(mTvPipBoundsState.getTvPipGravity(), in adjustBoundsForTemporaryDecor()
194 "%s: gravity: %s", TAG, Gravity.toString(mTvPipBoundsState.getTvPipGravity())); in getTvPipPlacement()
210 int currentX = mTvPipBoundsState.getTvPipGravity() & Gravity.HORIZONTAL_GRAVITY_MASK; in updateGravityOnExpansionToggled()
211 int currentY = mTvPipBoundsState.getTvPipGravity() & Gravity.VERTICAL_GRAVITY_MASK; in updateGravityOnExpansionToggled()
213 & Gravity.HORIZONTAL_GRAVITY_MASK; in updateGravityOnExpansionToggled()
215 & Gravity.VERTICAL_GRAVITY_MASK; in updateGravityOnExpansionToggled()
226 updatedGravity = Gravity.CENTER_HORIZONTAL | currentY; in updateGravityOnExpansionToggled()
228 updatedGravity = currentX | Gravity.CENTER_VERTICAL; in updateGravityOnExpansionToggled()
240 "%s: new gravity: %s", TAG, Gravity.toString(updatedGravity)); in updateGravityOnExpansionToggled()
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/
DButtonPreferenceTest.java25 import android.view.Gravity;
107 assertThat(lp.gravity).isEqualTo(Gravity.START); in onBindViewHolder_default_shouldReturnButtonGravityStart()
112 mPreference.setGravity(Gravity.START); in onBindViewHolder_setGravityStart_shouldReturnButtonGravityStart()
118 assertThat(lp.gravity).isEqualTo(Gravity.START); in onBindViewHolder_setGravityStart_shouldReturnButtonGravityStart()
123 mPreference.setGravity(Gravity.CENTER_HORIZONTAL); in onBindViewHolder_setGravityCenter_shouldReturnButtonGravityCenterHorizontal()
129 assertThat(lp.gravity).isEqualTo(Gravity.CENTER_HORIZONTAL); in onBindViewHolder_setGravityCenter_shouldReturnButtonGravityCenterHorizontal()
131 mPreference.setGravity(Gravity.CENTER_VERTICAL); in onBindViewHolder_setGravityCenter_shouldReturnButtonGravityCenterHorizontal()
133 assertThat(lp.gravity).isEqualTo(Gravity.CENTER_HORIZONTAL); in onBindViewHolder_setGravityCenter_shouldReturnButtonGravityCenterHorizontal()
135 mPreference.setGravity(Gravity.CENTER); in onBindViewHolder_setGravityCenter_shouldReturnButtonGravityCenterHorizontal()
137 assertThat(lp.gravity).isEqualTo(Gravity.CENTER_HORIZONTAL); in onBindViewHolder_setGravityCenter_shouldReturnButtonGravityCenterHorizontal()
[all …]
/frameworks/base/tests/GridLayoutTest/src/com/android/test/layout/
DAbstractLayoutTest.java27 import static android.view.Gravity.BOTTOM;
28 import static android.view.Gravity.CENTER;
29 import static android.view.Gravity.FILL;
30 import static android.view.Gravity.LEFT;
31 import static android.view.Gravity.NO_GRAVITY;
32 import static android.view.Gravity.RIGHT;
33 import static android.view.Gravity.TOP;
DLayoutInsetsTest.java7 import android.view.Gravity;
17 …static int[] GRAVITIES = {Gravity.LEFT, Gravity.LEFT, Gravity.CENTER_HORIZONTAL, Gravity.RIGHT, Gr…
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/
DDisplayCutoutView.java28 import android.view.Gravity;
117 case Gravity.TOP: in boundsFromDirection()
122 case Gravity.LEFT: in boundsFromDirection()
127 case Gravity.BOTTOM: in boundsFromDirection()
132 case Gravity.RIGHT: in boundsFromDirection()
146 boundsFromDirection(displayCutout, Gravity.LEFT, out); in localBounds()
148 boundsFromDirection(displayCutout, Gravity.TOP, out); in localBounds()
152 boundsFromDirection(displayCutout, Gravity.RIGHT, out); in localBounds()
154 boundsFromDirection(displayCutout, Gravity.BOTTOM, out); in localBounds()
/frameworks/base/core/tests/coretests/src/android/widget/listview/touch/
DListOfTouchablesTest.java21 import android.view.Gravity;
62 TouchUtils.dragViewBy(this, lastChild, Gravity.TOP | Gravity.LEFT, in testShortScroll()
79 Gravity.TOP | Gravity.LEFT, mListView.getTop()); in testLongScroll()
DListTouchBottomGravityManyTest.java21 import android.view.Gravity;
105 TouchUtils.dragViewBy(this, firstChild, Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, in testNoScroll()
127 TouchUtils.dragViewBy(this, firstChild, Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, in testShortScroll()
148 Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, 0, in testLongScroll()
/frameworks/base/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/
DReverseLinearLayout.java20 import android.view.Gravity;
139 private int mDefaultGravity = Gravity.NO_GRAVITY;
146 if (mDefaultGravity != Gravity.TOP && mDefaultGravity != Gravity.BOTTOM) return; in updateGravity()
151 gravityToApply = mDefaultGravity == Gravity.TOP ? Gravity.BOTTOM : Gravity.TOP; in updateGravity()
/frameworks/base/core/java/android/inputmethodservice/navigationbar/
DReverseLinearLayout.java22 import android.view.Gravity;
141 private int mDefaultGravity = Gravity.NO_GRAVITY;
148 if (mDefaultGravity != Gravity.TOP && mDefaultGravity != Gravity.BOTTOM) return; in updateGravity()
153 gravityToApply = mDefaultGravity == Gravity.TOP ? Gravity.BOTTOM : Gravity.TOP; in updateGravity()
/frameworks/base/core/tests/coretests/src/android/widget/gridview/touch/
DGridTouchVerticalSpacingTest.java21 import android.view.Gravity;
61 TouchUtils.dragViewBy(this, lastChild, Gravity.TOP | Gravity.LEFT, in testNoScroll()
78 TouchUtils.dragViewBy(this, lastChild, Gravity.TOP | Gravity.LEFT, in testShortScroll()
94 int distance = TouchUtils.dragViewToY(this, lastChild, Gravity.TOP | Gravity.LEFT, in testLongScroll()
/frameworks/base/core/java/com/android/internal/widget/
DNotificationOptimizedLinearLayout.java30 import android.view.Gravity;
214 final int minorGravity = getGravity() & Gravity.VERTICAL_GRAVITY_MASK; in requiresBaselineAlignmentForHorizontalLinearLayout()
234 final int result = gravity & Gravity.VERTICAL_GRAVITY_MASK; in requiresBaselineAlignmentForHorizontalLinearLayout()
235 if (result == Gravity.TOP || result == Gravity.BOTTOM) { in requiresBaselineAlignmentForHorizontalLinearLayout()
483 final int majorGravity = getGravity() & Gravity.VERTICAL_GRAVITY_MASK; in layoutVerticalOptimized()
484 final int minorGravity = getGravity() & Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK; in layoutVerticalOptimized()
487 case Gravity.BOTTOM: in layoutVerticalOptimized()
493 case Gravity.CENTER_VERTICAL: in layoutVerticalOptimized()
497 case Gravity.TOP: in layoutVerticalOptimized()
517 final int absoluteGravity = Gravity.getAbsoluteGravity(gravity, in layoutVerticalOptimized()
[all …]
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/
DAlertDialogLayout.java22 import android.view.Gravity;
288 final int majorGravity = gravity & Gravity.VERTICAL_GRAVITY_MASK; in onLayout()
289 final int minorGravity = gravity & Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK; in onLayout()
293 case Gravity.BOTTOM: in onLayout()
299 case Gravity.CENTER_VERTICAL: in onLayout()
303 case Gravity.TOP: in onLayout()
327 final int absoluteGravity = Gravity.getAbsoluteGravity( in onLayout()
331 switch (absoluteGravity & Gravity.HORIZONTAL_GRAVITY_MASK) { in onLayout()
332 case Gravity.CENTER_HORIZONTAL: in onLayout()
337 case Gravity.RIGHT: in onLayout()
[all …]

12345678910>>...13