Home
last modified time | relevance | path

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

1234567891011

/frameworks/support/compat/tests/java/android/support/v4/view/
DGravityCompatTest.java25 import android.view.Gravity;
37 assertEquals("Start constants", Gravity.START, GravityCompat.START); in testConstants()
38 assertEquals("End constants", Gravity.END, GravityCompat.END); in testConstants()
44 GravityCompat.getAbsoluteGravity(Gravity.LEFT, ViewCompat.LAYOUT_DIRECTION_LTR), in testGetAbsoluteGravity()
45 Gravity.LEFT); in testGetAbsoluteGravity()
47 GravityCompat.getAbsoluteGravity(Gravity.RIGHT, ViewCompat.LAYOUT_DIRECTION_LTR), in testGetAbsoluteGravity()
48 Gravity.RIGHT); in testGetAbsoluteGravity()
50 GravityCompat.getAbsoluteGravity(Gravity.LEFT, ViewCompat.LAYOUT_DIRECTION_RTL), in testGetAbsoluteGravity()
51 Gravity.LEFT); in testGetAbsoluteGravity()
53 GravityCompat.getAbsoluteGravity(Gravity.RIGHT, ViewCompat.LAYOUT_DIRECTION_RTL), in testGetAbsoluteGravity()
[all …]
/frameworks/support/transition/tests/src/android/support/transition/
DSlideBadEdgeTest.java23 import android.view.Gravity;
33 {Gravity.AXIS_CLIP, "AXIS_CLIP"},
34 {Gravity.AXIS_PULL_AFTER, "AXIS_PULL_AFTER"},
35 {Gravity.AXIS_PULL_BEFORE, "AXIS_PULL_BEFORE"},
36 {Gravity.AXIS_SPECIFIED, "AXIS_SPECIFIED"},
37 {Gravity.AXIS_Y_SHIFT, "AXIS_Y_SHIFT"},
38 {Gravity.AXIS_X_SHIFT, "AXIS_X_SHIFT"},
39 {Gravity.CENTER, "CENTER"},
40 {Gravity.CLIP_VERTICAL, "CLIP_VERTICAL"},
41 {Gravity.CLIP_HORIZONTAL, "CLIP_HORIZONTAL"},
[all …]
DSlideEdgeTest.java31 import android.view.Gravity;
41 {Gravity.START, "START"},
42 {Gravity.END, "END"},
43 {Gravity.LEFT, "LEFT"},
44 {Gravity.TOP, "TOP"},
45 {Gravity.RIGHT, "RIGHT"},
46 {Gravity.BOTTOM, "BOTTOM"},
115 case Gravity.LEFT: in testSlideOut()
116 case Gravity.START: in testSlideOut()
121 case Gravity.RIGHT: in testSlideOut()
[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/support/transition/src/android/support/transition/
DSidePropagation.java21 import android.view.Gravity;
36 private int mSide = Gravity.BOTTOM;
124 if (mSide == Gravity.START) { in distance()
127 side = isRtl ? Gravity.RIGHT : Gravity.LEFT; in distance()
128 } else if (mSide == Gravity.END) { in distance()
131 side = isRtl ? Gravity.LEFT : Gravity.RIGHT; in distance()
137 case Gravity.LEFT: in distance()
140 case Gravity.TOP: in distance()
143 case Gravity.RIGHT: in distance()
146 case Gravity.BOTTOM: in distance()
[all …]
DSlide.java31 import android.view.Gravity;
57 private int mSlideEdge = Gravity.BOTTOM;
62 @IntDef({Gravity.LEFT, Gravity.TOP, Gravity.RIGHT, Gravity.BOTTOM, Gravity.START, Gravity.END})
154 setSlideEdge(Gravity.BOTTOM); in Slide()
168 Styleable.Slide.SLIDE_EDGE, Gravity.BOTTOM); in Slide()
203 case Gravity.LEFT: in setSlideEdge()
206 case Gravity.TOP: in setSlideEdge()
209 case Gravity.RIGHT: in setSlideEdge()
212 case Gravity.BOTTOM: in setSlideEdge()
215 case Gravity.START: in setSlideEdge()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DHardwareUiLayout.java25 import android.view.Gravity;
223 final int absoluteGravity = Gravity.getAbsoluteGravity(gravity, layoutDirection); in rotateGravityRight()
224 final int verticalGravity = gravity & Gravity.VERTICAL_GRAVITY_MASK; in rotateGravityRight()
226 switch (absoluteGravity & Gravity.HORIZONTAL_GRAVITY_MASK) { in rotateGravityRight()
227 case Gravity.CENTER_HORIZONTAL: in rotateGravityRight()
228 retGravity |= Gravity.CENTER_VERTICAL; in rotateGravityRight()
230 case Gravity.RIGHT: in rotateGravityRight()
231 retGravity |= Gravity.BOTTOM; in rotateGravityRight()
233 case Gravity.LEFT: in rotateGravityRight()
235 retGravity |= Gravity.TOP; in rotateGravityRight()
[all …]
/frameworks/support/compat/java/android/support/v4/view/
DGravityCompat.java23 import 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;
65 Gravity.apply(gravity, w, h, container, outRect, layoutDirection); in apply()
67 Gravity.apply(gravity, w, h, container, outRect); in apply()
99 Gravity.apply(gravity, w, h, container, xAdj, yAdj, outRect, layoutDirection); in apply()
101 Gravity.apply(gravity, w, h, container, xAdj, yAdj, outRect); in apply()
127 Gravity.applyDisplay(gravity, display, inoutObj, layoutDirection); in applyDisplay()
129 Gravity.applyDisplay(gravity, display, inoutObj); in applyDisplay()
146 return Gravity.getAbsoluteGravity(gravity, layoutDirection); in getAbsoluteGravity()
/frameworks/base/core/java/android/widget/
DLinearLayout.java28 import android.view.Gravity;
163 @ViewDebug.FlagToString(mask = Gravity.NO_GRAVITY,
164 equals = Gravity.NO_GRAVITY,name = "NONE"),
165 @ViewDebug.FlagToString(mask = Gravity.TOP,
166 equals = Gravity.TOP, name = "TOP"),
167 @ViewDebug.FlagToString(mask = Gravity.BOTTOM,
168 equals = Gravity.BOTTOM, name = "BOTTOM"),
169 @ViewDebug.FlagToString(mask = Gravity.LEFT,
170 equals = Gravity.LEFT, name = "LEFT"),
171 @ViewDebug.FlagToString(mask = Gravity.RIGHT,
[all …]
/frameworks/base/core/java/android/app/
DActionBar.java31 import android.view.Gravity;
1356 @ViewDebug.IntToString(from = Gravity.NO_GRAVITY, to = "NONE"),
1357 @ViewDebug.IntToString(from = Gravity.TOP, to = "TOP"),
1358 @ViewDebug.IntToString(from = Gravity.BOTTOM, to = "BOTTOM"),
1359 @ViewDebug.IntToString(from = Gravity.LEFT, to = "LEFT"),
1360 @ViewDebug.IntToString(from = Gravity.RIGHT, to = "RIGHT"),
1361 @ViewDebug.IntToString(from = Gravity.START, to = "START"),
1362 @ViewDebug.IntToString(from = Gravity.END, to = "END"),
1363 @ViewDebug.IntToString(from = Gravity.CENTER_VERTICAL, to = "CENTER_VERTICAL"),
1364 @ViewDebug.IntToString(from = Gravity.FILL_VERTICAL, to = "FILL_VERTICAL"),
[all …]
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/
DScaleFrameLayout.java22 import android.view.Gravity;
34 private static final int DEFAULT_CHILD_GRAVITY = Gravity.TOP | Gravity.START;
141 final int absoluteGravity = Gravity.getAbsoluteGravity(gravity, layoutDirection); in onLayout()
142 final int verticalGravity = gravity & Gravity.VERTICAL_GRAVITY_MASK; in onLayout()
144 switch (absoluteGravity & Gravity.HORIZONTAL_GRAVITY_MASK) { in onLayout()
145 case Gravity.CENTER_HORIZONTAL: in onLayout()
149 case Gravity.RIGHT: in onLayout()
152 case Gravity.LEFT: in onLayout()
158 case Gravity.TOP: in onLayout()
161 case Gravity.CENTER_VERTICAL: in onLayout()
[all …]
/frameworks/support/samples/Support7Demos/src/com/example/android/supportv7/app/
DToolbarDisplayOptions.java25 import android.view.Gravity;
98 switch (lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK) { in onClick()
99 case Gravity.LEFT: in onClick()
100 newGravity = Gravity.CENTER_HORIZONTAL; in onClick()
102 case Gravity.CENTER_HORIZONTAL: in onClick()
103 newGravity = Gravity.RIGHT; in onClick()
105 case Gravity.RIGHT: in onClick()
106 newGravity = Gravity.LEFT; in onClick()
109 lp.gravity = lp.gravity & ~Gravity.HORIZONTAL_GRAVITY_MASK | newGravity; in onClick()
DActionBarDisplayOptions.java23 import android.view.Gravity;
102 switch (lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK) { in onClick()
103 case Gravity.LEFT: in onClick()
104 newGravity = Gravity.CENTER_HORIZONTAL; in onClick()
106 case Gravity.CENTER_HORIZONTAL: in onClick()
107 newGravity = Gravity.RIGHT; in onClick()
109 case Gravity.RIGHT: in onClick()
110 newGravity = Gravity.LEFT; in onClick()
113 lp.gravity = lp.gravity & ~Gravity.HORIZONTAL_GRAVITY_MASK | newGravity; in onClick()
/frameworks/support/samples/SupportTransitionDemos/src/com/example/android/support/transition/widget/
DArcMotionUsage.java25 import android.view.Gravity;
59 if ((lp.gravity & Gravity.START) == Gravity.START) { in onCreate()
60 lp.gravity = Gravity.END | Gravity.BOTTOM; in onCreate()
62 lp.gravity = Gravity.START | Gravity.TOP; in onCreate()
/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/support/design/tests/src/android/support/design/widget/
DCoordinatorLayoutTest.java55 import android.view.Gravity;
156 {Gravity.NO_GRAVITY, 0, 0}, in testLayoutChildren()
157 {Gravity.LEFT, 0, 0}, in testLayoutChildren()
159 {Gravity.TOP, 0, 0}, in testLayoutChildren()
160 {Gravity.CENTER, horizontallyCentered, verticallyCentered}, in testLayoutChildren()
161 {Gravity.CENTER_HORIZONTAL, horizontallyCentered, 0}, in testLayoutChildren()
162 {Gravity.CENTER_VERTICAL, 0, verticallyCentered}, in testLayoutChildren()
163 {Gravity.RIGHT, end, 0}, in testLayoutChildren()
165 {Gravity.BOTTOM, 0, bottom}, in testLayoutChildren()
166 {Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM, horizontallyCentered, bottom}, in testLayoutChildren()
[all …]
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/
DLinearLayoutManagerWrapContentTest.java28 import android.view.Gravity;
160 return Gravity.TOP; in getVerticalGravity()
163 return Gravity.BOTTOM; in getVerticalGravity()
165 return Gravity.TOP; in getVerticalGravity()
173 return Gravity.RIGHT; in getHorizontalGravity()
175 return Gravity.LEFT; in getHorizontalGravity()
179 return Gravity.RIGHT; in getHorizontalGravity()
181 return Gravity.LEFT; in getHorizontalGravity()
/frameworks/support/wear/src/android/support/wear/widget/
DBoxInsetLayout.java32 import android.view.Gravity;
51 private static final int DEFAULT_CHILD_GRAVITY = Gravity.TOP | Gravity.START;
257 final int absoluteGravity = Gravity.getAbsoluteGravity(gravity, layoutDirection); in onLayout()
258 final int verticalGravity = gravity & Gravity.VERTICAL_GRAVITY_MASK; in onLayout()
259 final int horizontalGravity = gravity & Gravity.HORIZONTAL_GRAVITY_MASK; in onLayout()
269 switch (absoluteGravity & Gravity.HORIZONTAL_GRAVITY_MASK) { in onLayout()
270 case Gravity.CENTER_HORIZONTAL: in onLayout()
274 case Gravity.RIGHT: in onLayout()
277 case Gravity.LEFT: in onLayout()
291 case Gravity.CENTER_VERTICAL: in onLayout()
[all …]
/frameworks/support/core-ui/java/android/support/v4/widget/
DDrawerLayout.java51 import android.view.Gravity;
151 @IntDef(value = {Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END},
314 mLeftCallback = new ViewDragCallback(Gravity.LEFT); in DrawerLayout()
315 mRightCallback = new ViewDragCallback(Gravity.RIGHT); in DrawerLayout()
434 } else if ((gravity & Gravity.LEFT) == Gravity.LEFT) { in setDrawerShadow()
436 } else if ((gravity & Gravity.RIGHT) == Gravity.RIGHT) { in setDrawerShadow()
547 setDrawerLockMode(lockMode, Gravity.LEFT); in setDrawerLockMode()
548 setDrawerLockMode(lockMode, Gravity.RIGHT); in setDrawerLockMode()
575 case Gravity.LEFT: in setDrawerLockMode()
578 case Gravity.RIGHT: in setDrawerLockMode()
[all …]
/frameworks/support/design/src/android/support/design/internal/
DForegroundLinearLayout.java32 import android.view.Gravity;
46 private int mForegroundGravity = Gravity.FILL;
100 if ((foregroundGravity & Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK) == 0) { in setForegroundGravity()
101 foregroundGravity |= Gravity.START; in setForegroundGravity()
104 if ((foregroundGravity & Gravity.VERTICAL_GRAVITY_MASK) == 0) { in setForegroundGravity()
105 foregroundGravity |= Gravity.TOP; in setForegroundGravity()
110 if (mForegroundGravity == Gravity.FILL && mForeground != null) { in setForegroundGravity()
165 if (mForegroundGravity == Gravity.FILL) { in setForeground()
222 Gravity.apply(mForegroundGravity, foreground.getIntrinsicWidth(), in draw()
/frameworks/base/core/java/com/android/internal/policy/
DPipSnapAlgorithm.java26 import android.view.Gravity;
216 Gravity.apply(mSnapGravities.get(i), stackBounds.width(), stackBounds.height(), in findClosestSnapBounds()
237 Gravity.apply(mSnapGravities.get(i), stackBounds.width(), stackBounds.height(), in findClosestSnapBounds()
444 mSnapGravities.add(Gravity.TOP | Gravity.CENTER_HORIZONTAL); in calculateSnapTargets()
445 mSnapGravities.add(Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL); in calculateSnapTargets()
447 mSnapGravities.add(Gravity.CENTER_VERTICAL | Gravity.LEFT); in calculateSnapTargets()
448 mSnapGravities.add(Gravity.CENTER_VERTICAL | Gravity.RIGHT); in calculateSnapTargets()
454 mSnapGravities.add(Gravity.TOP | Gravity.LEFT); in calculateSnapTargets()
455 mSnapGravities.add(Gravity.TOP | Gravity.RIGHT); in calculateSnapTargets()
456 mSnapGravities.add(Gravity.BOTTOM | Gravity.LEFT); in calculateSnapTargets()
[all …]
/frameworks/base/core/tests/coretests/src/android/widget/listview/touch/
DListTouchBottomGravityManyTest.java23 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()
DListOfTouchablesTest.java22 import android.view.Gravity;
63 TouchUtils.dragViewBy(this, lastChild, Gravity.TOP | Gravity.LEFT, in testShortScroll()
80 Gravity.TOP | Gravity.LEFT, mListView.getTop()); in testLongScroll()

1234567891011