Home
last modified time | relevance | path

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

123456

/frameworks/support/v4/java/android/support/v4/view/
DGravityCompat.java29 int getAbsoluteGravity(int gravity, int layoutDirection); in getAbsoluteGravity() argument
30 void apply(int gravity, int w, int h, Rect container, Rect outRect, int layoutDirection); in apply() argument
31 void apply(int gravity, int w, int h, Rect container, int xAdj, int yAdj, in apply() argument
33 void applyDisplay(int gravity, Rect display, Rect inoutObj, int layoutDirection); in applyDisplay() argument
38 public int getAbsoluteGravity(int gravity, int layoutDirection) { in getAbsoluteGravity() argument
40 return gravity & ~RELATIVE_LAYOUT_DIRECTION; in getAbsoluteGravity()
44 public void apply(int gravity, int w, int h, Rect container, Rect outRect, in apply() argument
46 Gravity.apply(gravity, w, h, container, outRect); in apply()
50 public void apply(int gravity, int w, int h, Rect container, int xAdj, int yAdj, in apply() argument
52 Gravity.apply(gravity, w, h, container, xAdj, yAdj, outRect); in apply()
[all …]
/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/support/v4/jellybean-mr1/android/support/v4/view/
DGravityCompatJellybeanMr1.java25 public static int getAbsoluteGravity(int gravity, int layoutDirection) { in getAbsoluteGravity() argument
26 return Gravity.getAbsoluteGravity(gravity, layoutDirection); in getAbsoluteGravity()
29 public static void apply(int gravity, int w, int h, Rect container, Rect outRect, in apply() argument
31 Gravity.apply(gravity, w, h, container, outRect, layoutDirection); in apply()
34 public static void apply(int gravity, int w, int h, Rect container, int xAdj, int yAdj, in apply() argument
36 Gravity.apply(gravity, w, h, container, xAdj, yAdj, outRect, layoutDirection); in apply()
39 public static void applyDisplay(int gravity, Rect display, Rect inoutObj, int layoutDirection) { in applyDisplay() argument
40 Gravity.applyDisplay(gravity, display, inoutObj, layoutDirection); in applyDisplay()
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/support/
DDrawerLayoutUtil.java39 int gravity = -1; in openDrawer() local
41 gravity = LEFT; in openDrawer()
43 gravity = RIGHT; in openDrawer()
45 gravity = START; in openDrawer()
47 gravity = END; in openDrawer()
49 if (gravity > 0) { in openDrawer()
50 openDrawer(drawerLayout, gravity); in openDrawer()
54 private static void openDrawer(View drawerLayout, int gravity) { in openDrawer() argument
57 gravity); in openDrawer() local
/frameworks/base/core/java/android/inputmethodservice/
DSoftInputWindow.java69 int windowType, int gravity, boolean takesFocus) { in SoftInputWindow() argument
76 mGravity = gravity; in SoftInputWindow()
111 public void setGravity(int gravity) { in setGravity() argument
113 lp.gravity = gravity; in setGravity()
119 return getWindow().getAttributes().gravity; in getGravity()
123 if (lp.gravity == Gravity.TOP || lp.gravity == Gravity.BOTTOM) { in updateWidthHeight()
174 lp.gravity = mGravity; in initDockWindow()
/frameworks/support/v4/api21/android/support/v4/widget/
DDrawerLayoutCompatApi21.java45 public static void dispatchChildInsets(View child, Object insets, int gravity) { in dispatchChildInsets() argument
47 if (gravity == Gravity.LEFT) { in dispatchChildInsets()
50 } else if (gravity == Gravity.RIGHT) { in dispatchChildInsets()
58 int gravity) { in applyMarginInsets() argument
60 if (gravity == Gravity.LEFT) { in applyMarginInsets()
63 } else if (gravity == Gravity.RIGHT) { in applyMarginInsets()
/frameworks/support/v7/appcompat/src/android/support/v7/app/
DActionBar.java1317 public int gravity = Gravity.NO_GRAVITY; field in ActionBar.LayoutParams
1323gravity = a.getInt(R.styleable.ActionBarLayout_android_layout_gravity, Gravity.NO_GRAVITY); in LayoutParams()
1329 this.gravity = Gravity.CENTER_VERTICAL | GravityCompat.START; in LayoutParams()
1332 public LayoutParams(int width, int height, int gravity) { in LayoutParams() argument
1334 this.gravity = gravity; in LayoutParams()
1337 public LayoutParams(int gravity) { in LayoutParams() argument
1338 this(WRAP_CONTENT, MATCH_PARENT, gravity); in LayoutParams()
1344 this.gravity = source.gravity; in LayoutParams()
/frameworks/base/test-runner/src/android/test/
DTouchUtils.java486 private static void getStartLocation(View v, int gravity, int[] xy) { in getStartLocation() argument
492 switch (gravity & Gravity.VERTICAL_GRAVITY_MASK) { in getStartLocation()
505 switch (gravity & Gravity.HORIZONTAL_GRAVITY_MASK) { in getStartLocation()
536 public static int dragViewBy(ActivityInstrumentationTestCase test, View v, int gravity, in dragViewBy() argument
538 return dragViewBy((InstrumentationTestCase) test, v, gravity, deltaX, deltaY); in dragViewBy()
558 public static int dragViewBy(InstrumentationTestCase test, View v, int gravity, int deltaX, in dragViewBy() argument
562 getStartLocation(v, gravity, xy); in dragViewBy()
591 public static int dragViewTo(ActivityInstrumentationTestCase test, View v, int gravity, int toX, in dragViewTo() argument
593 return dragViewTo((InstrumentationTestCase) test, v, gravity, toX, toY); in dragViewTo()
608 public static int dragViewTo(InstrumentationTestCase test, View v, int gravity, int toX, in dragViewTo() argument
[all …]
/frameworks/base/core/java/android/widget/
DFrameLayout.java297 int gravity = lp.gravity; in layoutChildren() local
298 if (gravity == -1) { in layoutChildren()
299 gravity = DEFAULT_CHILD_GRAVITY; in layoutChildren()
303 final int absoluteGravity = Gravity.getAbsoluteGravity(gravity, layoutDirection); in layoutChildren()
304 final int verticalGravity = gravity & Gravity.VERTICAL_GRAVITY_MASK; in layoutChildren()
440 public int gravity = -1; field in FrameLayout.LayoutParams
449gravity = a.getInt(com.android.internal.R.styleable.FrameLayout_Layout_layout_gravity, -1); in LayoutParams()
472 public LayoutParams(int width, int height, int gravity) { in LayoutParams() argument
474 this.gravity = gravity; in LayoutParams()
500 this.gravity = source.gravity; in LayoutParams()
DPopupMenu.java86 public PopupMenu(Context context, View anchor, int gravity) { in PopupMenu() argument
87 this(context, anchor, gravity, R.attr.popupMenuStyle, 0); in PopupMenu()
107 public PopupMenu(Context context, View anchor, int gravity, int popupStyleAttr, in PopupMenu() argument
114 mPopup.setGravity(gravity); in PopupMenu()
128 public void setGravity(int gravity) { in setGravity() argument
129 mPopup.setGravity(gravity); in setGravity()
DLinearLayout.java1153 final int gravity = (lp.gravity < 0 ? mGravity : lp.gravity) in measureHorizontal() local
1155 final int index = ((gravity >> Gravity.AXIS_Y_SHIFT) in measureHorizontal()
1326 final int gravity = (lp.gravity < 0 ? mGravity : lp.gravity) in measureHorizontal() local
1328 final int index = ((gravity >> Gravity.AXIS_Y_SHIFT) in measureHorizontal()
1559 int gravity = lp.gravity; in layoutVertical() local
1560 if (gravity < 0) { in layoutVertical()
1561 gravity = minorGravity; in layoutVertical()
1564 final int absoluteGravity = Gravity.getAbsoluteGravity(gravity, layoutDirection); in layoutVertical()
1686 int gravity = lp.gravity; in layoutHorizontal() local
1687 if (gravity < 0) { in layoutHorizontal()
[all …]
DToast.java211 public void setGravity(int gravity, int xOffset, int yOffset) { in setGravity() argument
212 mTN.mGravity = gravity; in setGravity()
407 … final int gravity = Gravity.getAbsoluteGravity(mGravity, config.getLayoutDirection()); in handleShow() local
408 mParams.gravity = gravity; in handleShow()
409 if ((gravity & Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.FILL_HORIZONTAL) { in handleShow()
412 if ((gravity & Gravity.VERTICAL_GRAVITY_MASK) == Gravity.FILL_VERTICAL) { in handleShow()
DPopupWindow.java994 public void showAtLocation(View parent, int gravity, int x, int y) { in showAtLocation() argument
995 showAtLocation(parent.getWindowToken(), gravity, x, y); in showAtLocation() local
1009 public void showAtLocation(IBinder token, int gravity, int x, int y) { in showAtLocation() argument
1025 if (gravity != Gravity.NO_GRAVITY) { in showAtLocation()
1026 p.gravity = gravity; in showAtLocation()
1092 public void showAsDropDown(View anchor, int xoff, int yoff, int gravity) { in showAsDropDown() argument
1099 registerForScrollChanged(anchor, xoff, yoff, gravity); in showAsDropDown()
1107 final boolean aboveAnchor = findDropDownPosition(anchor, p, xoff, yoff, gravity); in showAsDropDown()
1288 p.gravity = Gravity.START | Gravity.TOP; in createPopupLayoutParams()
1395 int yoff, int gravity) { in findDropDownPosition() argument
[all …]
/frameworks/base/core/java/android/app/
DActionBar.java1336 public int gravity = Gravity.NO_GRAVITY; field in ActionBar.LayoutParams
1343 gravity = a.getInt( in LayoutParams()
1351 this.gravity = Gravity.CENTER_VERTICAL | Gravity.START; in LayoutParams()
1354 public LayoutParams(int width, int height, int gravity) { in LayoutParams() argument
1357 this.gravity = gravity; in LayoutParams()
1360 public LayoutParams(int gravity) { in LayoutParams() argument
1361 this(WRAP_CONTENT, MATCH_PARENT, gravity); in LayoutParams()
1366 this.gravity = source.gravity; in LayoutParams()
1388 encoder.addProperty("gravity", gravity); in encodeProperties()
/frameworks/support/v4/java/android/support/v4/widget/
DPopupWindowCompat.java32 void showAsDropDown(PopupWindow popup, View anchor, int xoff, int yoff, int gravity); in showAsDropDown() argument
45 int gravity) { in showAsDropDown() argument
91 int gravity) { in showAsDropDown() argument
92 PopupWindowCompatKitKat.showAsDropDown(popup, anchor, xoff, yoff, gravity); in showAsDropDown()
170 int gravity) { in showAsDropDown() argument
171 IMPL.showAsDropDown(popup, anchor, xoff, yoff, gravity); in showAsDropDown()
DDrawerLayout.java444 public void setDrawerShadow(Drawable shadowDrawable, @EdgeGravity int gravity) { in setDrawerShadow() argument
454 if ((gravity & GravityCompat.START) == GravityCompat.START) { in setDrawerShadow()
456 } else if ((gravity & GravityCompat.END) == GravityCompat.END) { in setDrawerShadow()
458 } else if ((gravity & Gravity.LEFT) == Gravity.LEFT) { in setDrawerShadow()
460 } else if ((gravity & Gravity.RIGHT) == Gravity.RIGHT) { in setDrawerShadow()
483 public void setDrawerShadow(@DrawableRes int resId, @EdgeGravity int gravity) { in setDrawerShadow() argument
484 setDrawerShadow(getResources().getDrawable(resId), gravity); in setDrawerShadow() local
597 final int gravity = ((LayoutParams) drawerView.getLayoutParams()).gravity; in setDrawerLockMode() local
598 setDrawerLockMode(lockMode, gravity); in setDrawerLockMode()
796 final int gravity = ((LayoutParams) drawerView.getLayoutParams()).gravity; in getDrawerViewAbsoluteGravity() local
[all …]
/frameworks/support/v7/appcompat/src/android/support/v7/widget/
DPopupMenu.java84 public PopupMenu(Context context, View anchor, int gravity) { in PopupMenu() argument
85 this(context, anchor, gravity, R.attr.popupMenuStyle, 0); in PopupMenu()
105 public PopupMenu(Context context, View anchor, int gravity, int popupStyleAttr, in PopupMenu() argument
112 mPopup.setGravity(gravity); in PopupMenu()
126 public void setGravity(int gravity) { in setGravity() argument
127 mPopup.setGravity(gravity); in setGravity()
DLinearLayoutCompat.java1061 final int gravity = (lp.gravity < 0 ? mGravity : lp.gravity) in measureHorizontal() local
1063 final int index = ((gravity >> Gravity.AXIS_Y_SHIFT) in measureHorizontal()
1234 final int gravity = (lp.gravity < 0 ? mGravity : lp.gravity) in measureHorizontal() local
1236 final int index = ((gravity >> Gravity.AXIS_Y_SHIFT) in measureHorizontal()
1467 int gravity = lp.gravity; in layoutVertical() local
1468 if (gravity < 0) { in layoutVertical()
1469 gravity = minorGravity; in layoutVertical()
1472 final int absoluteGravity = GravityCompat.getAbsoluteGravity(gravity, in layoutVertical()
1584 int gravity = lp.gravity; in layoutHorizontal() local
1585 if (gravity < 0) { in layoutHorizontal()
[all …]
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/
DScaleFrameLayout.java101 int gravity = lp.gravity; in onLayout() local
102 if (gravity == -1) { in onLayout()
103 gravity = DEFAULT_CHILD_GRAVITY; in onLayout()
106 final int absoluteGravity = Gravity.getAbsoluteGravity(gravity, layoutDirection); in onLayout()
107 final int verticalGravity = gravity & Gravity.VERTICAL_GRAVITY_MASK; in onLayout()
/frameworks/support/percent/src/android/support/percent/
DPercentFrameLayout.java113 public LayoutParams(int width, int height, int gravity) { in LayoutParams() argument
114 super(width, height, gravity); in LayoutParams()
127 gravity = source.gravity; in LayoutParams()
/frameworks/base/docs/html/guide/topics/sensors/
Dsensors_motion.jd2 page.tags=sensorevent,accelerometer,gyroscope,gravity,rotation,stepcounter
50 sensors can be either hardware-based or software-based (the gravity, linear acceleration, and
88 <td>Acceleration force along the x axis (including gravity).</td>
93 <td>Acceleration force along the y axis (including gravity).</td>
97 <td>Acceleration force along the z axis (including gravity).</td>
102 <td>Force of gravity along the x axis.</td>
107 <td>Force of gravity along the y axis.</td>
111 <td>Force of gravity along the z axis.</td>
156 <td>Acceleration force along the x axis (excluding gravity).</td>
161 <td>Acceleration force along the y axis (excluding gravity).</td>
[all …]
/frameworks/support/v4/kitkat/android/support/v4/widget/
DPopupWindowCompatKitKat.java29 int gravity) { in showAsDropDown() argument
30 popup.showAsDropDown(anchor, xoff, yoff, gravity); in showAsDropDown()
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/helper/
DItemTouchHelperTest.java458 private static void getStartLocation(View v, int gravity, int[] xy) { in getStartLocation() argument
464 switch (gravity & Gravity.VERTICAL_GRAVITY_MASK) { in getStartLocation()
477 switch (gravity & Gravity.HORIZONTAL_GRAVITY_MASK) { in getStartLocation()
503 public static int dragViewTo(InstrumentationTestCase test, View v, int gravity, int toX, in dragViewTo() argument
507 getStartLocation(v, gravity, xy); in dragViewTo()
533 public static int dragViewToX(InstrumentationTestCase test, View v, int gravity, int toX) { in dragViewToX() argument
536 getStartLocation(v, gravity, xy); in dragViewToX()
559 public static int dragViewToY(InstrumentationTestCase test, View v, int gravity, int toY) { in dragViewToY() argument
562 getStartLocation(v, gravity, xy); in dragViewToY()
/frameworks/support/v4/api21/android/support/v4/graphics/drawable/
DRoundedBitmapDrawable21.java51 void gravityCompatApply(int gravity, int bitmapWidth, int bitmapHeight, in gravityCompatApply() argument
53 Gravity.apply(gravity, bitmapWidth, bitmapHeight, in gravityCompatApply()
/frameworks/support/v4/donut/android/support/v4/graphics/drawable/
DRoundedBitmapDrawable.java145 public void setGravity(int gravity) { in setGravity() argument
146 if (mGravity != gravity) { in setGravity()
147 mGravity = gravity; in setGravity()
216 void gravityCompatApply(int gravity, int bitmapWidth, int bitmapHeight, in gravityCompatApply() argument

123456