GravityFlags Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Enumerates values returned by several types and taken as a parameter of several types.
This enumeration supports a bitwise combination of its member values.
[System.Flags]
public enum GravityFlags
[<System.Flags>]
type GravityFlags =
- Inheritance
-
GravityFlags
- Attributes
Fields
Name | Value | Description |
---|---|---|
AxisXShift | 0 | Bits defining the horizontal axis. |
NoGravity | 0 | |
AxisSpecified | 1 | Raw bit indicating the gravity for an axis has been specified. |
CenterHorizontal | 1 | Place object in the horizontal center of its container, not changing its size. |
AxisPullBefore | 2 | Raw bit controlling how the left/top edge is placed. |
Left | 3 | Push object to the left of its container, not changing its size. |
AxisPullAfter | 4 | Raw bit controlling how the right/bottom edge is placed. |
AxisYShift | 4 | Bits defining the vertical axis. |
Right | 5 | Push object to the right of its container, not changing its size. |
FillHorizontal | 7 | Grow the horizontal size of the object if needed so it completely fills its container. |
HorizontalGravityMask | 7 | Binary mask to get the absolute horizontal gravity of a gravity. |
AxisClip | 8 | Raw bit controlling whether the right/bottom edge is clipped to its container, based on the gravity direction being applied. |
ClipHorizontal | 8 | Flag to clip the edges of the object to its container along the horizontal axis. |
CenterVertical | 16 | Place object in the vertical center of its container, not changing its size. |
Center | 17 | Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. |
Top | 48 | Push object to the top of its container, not changing its size. |
Bottom | 80 | Push object to the bottom of its container, not changing its size. |
FillVertical | 112 | Grow the vertical size of the object if needed so it completely fills its container. |
VerticalGravityMask | 112 | Binary mask to get the vertical gravity of a gravity. |
Fill | 119 | Grow the horizontal and vertical size of the object if needed so it completely fills its container. |
ClipVertical | 128 | Flag to clip the edges of the object to its container along the vertical axis. |
RelativeLayoutDirection | 8388608 | Raw bit controlling whether the layout direction is relative or not (START/END instead of absolute LEFT/RIGHT). |
Start | 8388611 | Push object to x-axis position at the start of its container, not changing its size. |
End | 8388613 | Push object to x-axis position at the end of its container, not changing its size. |
RelativeHorizontalGravityMask | 8388615 | Binary mask for the horizontal gravity and script specific direction bit. |
DisplayClipHorizontal | 16777216 | Special constant to enable clipping to an overall display along the horizontal dimension. |
DisplayClipVertical | 268435456 | Special constant to enable clipping to an overall display along the vertical dimension. |
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.