Lines Matching refs:gravity

212     /** Shadow drawables for different gravity */
437 * defined with a resource qualifier "ldrtl" for API 17 and above with the gravity
442 * @param gravity Which drawer the shadow should apply to
444 public void setDrawerShadow(Drawable shadowDrawable, @EdgeGravity int gravity) {
454 if ((gravity & GravityCompat.START) == GravityCompat.START) {
456 } else if ((gravity & GravityCompat.END) == GravityCompat.END) {
458 } else if ((gravity & Gravity.LEFT) == Gravity.LEFT) {
460 } else if ((gravity & Gravity.RIGHT) == Gravity.RIGHT) {
476 * defined with a resource qualifier "ldrtl" for API 17 and above with the gravity
481 * @param gravity Which drawer the shadow should apply to
483 public void setDrawerShadow(@DrawableRes int resId, @EdgeGravity int gravity) {
484 setDrawerShadow(getResources().getDrawable(resId), gravity);
597 final int gravity = ((LayoutParams) drawerView.getLayoutParams()).gravity;
598 setDrawerLockMode(lockMode, gravity);
602 * Check the lock mode of the drawer with the given gravity.
639 * Sets the title of the drawer with the given gravity.
659 * Returns the title of the drawer with the given gravity.
792 * @return the absolute gravity of the child drawerView, resolved according
796 final int gravity = ((LayoutParams) drawerView.getLayoutParams()).gravity;
797 return GravityCompat.getAbsoluteGravity(gravity, ViewCompat.getLayoutDirection(this));
829 * @param gravity the gravity of the child to return. If specified as a
832 * @return the drawer with the specified gravity
834 View findDrawerWithGravity(int gravity) {
836 gravity, ViewCompat.getLayoutDirection(this)) & Gravity.HORIZONTAL_GRAVITY_MASK;
849 * Simple gravity to string - only supports LEFT and RIGHT for debugging output.
851 * @param gravity Absolute gravity value
854 static String gravityToString(@EdgeGravity int gravity) {
855 if ((gravity & Gravity.LEFT) == Gravity.LEFT) {
858 if ((gravity & Gravity.RIGHT) == Gravity.RIGHT) {
861 return Integer.toHexString(gravity);
926 final int cgrav = GravityCompat.getAbsoluteGravity(lp.gravity, layoutDirection);
950 throw new IllegalStateException("Child drawer has absolute gravity " +
979 // Prefer shadows defined with start/end gravity over left and right.
1062 final int vgrav = lp.gravity & Gravity.VERTICAL_GRAVITY_MASK;
1267 return ((LayoutParams) child.getLayoutParams()).gravity == Gravity.NO_GRAVITY;
1271 final int gravity = ((LayoutParams) child.getLayoutParams()).gravity;
1272 final int absGravity = GravityCompat.getAbsoluteGravity(gravity,
1458 * @param gravity Gravity.LEFT to move the left drawer or Gravity.RIGHT for the right.
1461 public void openDrawer(@EdgeGravity int gravity) {
1462 final View drawerView = findDrawerWithGravity(gravity);
1464 throw new IllegalArgumentException("No drawer view found with gravity " +
1465 gravityToString(gravity));
1498 * @param gravity Gravity.LEFT to move the left drawer or Gravity.RIGHT for the right.
1501 public void closeDrawer(@EdgeGravity int gravity) {
1502 final View drawerView = findDrawerWithGravity(gravity);
1504 throw new IllegalArgumentException("No drawer view found with gravity " +
1505 gravityToString(gravity));
1530 * visible state. If there is no drawer with the given gravity this method
1562 * If there is no drawer with the given gravity this method will return false.
1719 ss.openDrawerGravity = ((LayoutParams) openDrawer.getLayoutParams()).gravity;
1811 public ViewDragCallback(int gravity) {
1812 mAbsGravity = gravity;
1825 // Only capture views where the gravity matches what we're looking for.
1969 public int gravity = Gravity.NO_GRAVITY;
1978 this.gravity = a.getInt(0, Gravity.NO_GRAVITY);
1986 public LayoutParams(int width, int height, int gravity) {
1988 this.gravity = gravity;
1993 this.gravity = source.gravity;