belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1
GravityCompat
public
final
class
GravityCompat
extends Object
java.lang.Object | |
↳ | android.support.v4.view.GravityCompat |
Compatibility shim for accessing newer functionality from Gravity
.
Summary
Constants | |
---|---|
int |
END
Push object to x-axis position at the end of its container, not changing its size. |
int |
RELATIVE_HORIZONTAL_GRAVITY_MASK
Binary mask for the horizontal gravity and script specific direction bit. |
int |
RELATIVE_LAYOUT_DIRECTION
Raw bit controlling whether the layout direction is relative or not (START/END instead of absolute LEFT/RIGHT). |
int |
START
Push object to x-axis position at the start of its container, not changing its size. |
Public methods | |
---|---|
static
void
|
apply(int gravity, int w, int h, Rect container, Rect outRect, int layoutDirection)
Apply a gravity constant to an object and take care if layout direction is RTL or not. |
static
void
|
apply(int gravity, int w, int h, Rect container, int xAdj, int yAdj, Rect outRect, int layoutDirection)
Apply a gravity constant to an object. |
static
void
|
applyDisplay(int gravity, Rect display, Rect inoutObj, int layoutDirection)
Apply additional gravity behavior based on the overall "display" that an object exists in. |
static
int
|
getAbsoluteGravity(int gravity, int layoutDirection)
Convert script specific gravity to absolute horizontal value. |
Inherited methods | |
---|---|
![]()
java.lang.Object
|
Constants
END
int END
Push object to x-axis position at the end of its container, not changing its size.
Constant Value: 8388613 (0x00800005)
RELATIVE_HORIZONTAL_GRAVITY_MASK
int RELATIVE_HORIZONTAL_GRAVITY_MASK
Binary mask for the horizontal gravity and script specific direction bit.
Constant Value: 8388615 (0x00800007)
RELATIVE_LAYOUT_DIRECTION
int RELATIVE_LAYOUT_DIRECTION
Raw bit controlling whether the layout direction is relative or not (START/END instead of absolute LEFT/RIGHT).
Constant Value: 8388608 (0x00800000)