GravityFlags GravityFlags Enum

Definition

Enumerates values returned by several types and taken as a parameter of several types.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

[System.Flags]
public enum GravityFlags
type GravityFlags = 
Inheritance
GravityFlagsGravityFlags
Attributes

Fields

AxisClip AxisClip 8

Raw bit controlling whether the right/bottom edge is clipped to its container, based on the gravity direction being applied.

AxisPullAfter AxisPullAfter 4

Raw bit controlling how the right/bottom edge is placed.

AxisPullBefore AxisPullBefore 2

Raw bit controlling how the left/top edge is placed.

AxisSpecified AxisSpecified 1

Raw bit indicating the gravity for an axis has been specified.

AxisXShift AxisXShift 0

Bits defining the horizontal axis.

AxisYShift AxisYShift 4

Bits defining the vertical axis.

Bottom Bottom 80

Push object to the bottom of its container, not changing its size.

Center Center 17

Place the object in the center of its container in both the vertical and horizontal axis, not changing its size.

CenterHorizontal CenterHorizontal 1

Place object in the horizontal center of its container, not changing its size.

CenterVertical CenterVertical 16

Place object in the vertical center of its container, not changing its size.

ClipHorizontal ClipHorizontal 8

Flag to clip the edges of the object to its container along the horizontal axis.

ClipVertical ClipVertical 128

Flag to clip the edges of the object to its container along the vertical axis.

DisplayClipHorizontal DisplayClipHorizontal 16777216

Special constant to enable clipping to an overall display along the horizontal dimension.

DisplayClipVertical DisplayClipVertical 268435456

Special constant to enable clipping to an overall display along the vertical dimension.

End End 8388613

Push object to x-axis position at the end of its container, not changing its size.

Fill Fill 119

Grow the horizontal and vertical size of the object if needed so it completely fills its container.

FillHorizontal FillHorizontal 7

Grow the horizontal size of the object if needed so it completely fills its container.

FillVertical FillVertical 112

Grow the vertical size of the object if needed so it completely fills its container.

HorizontalGravityMask HorizontalGravityMask 7

Binary mask to get the absolute horizontal gravity of a gravity.

Left Left 3

Push object to the left of its container, not changing its size.

NoGravity NoGravity 0
RelativeHorizontalGravityMask RelativeHorizontalGravityMask 8388615

Binary mask for the horizontal gravity and script specific direction bit.

RelativeLayoutDirection RelativeLayoutDirection 8388608

Raw bit controlling whether the layout direction is relative or not (START/END instead of absolute LEFT/RIGHT).

Right Right 5

Push object to the right of its container, not changing its size.

Start Start 8388611

Push object to x-axis position at the start of its container, not changing its size.

Top Top 48

Push object to the top of its container, not changing its size.

VerticalGravityMask VerticalGravityMask 112

Binary mask to get the vertical gravity of a gravity.

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.

Applies to