Version: Unity 6 Preview (6000.0)
LanguageEnglish
  • C#

Gravity

enumeration

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Mirrors the Gravity enum.

For more information about the attribute, see Android's documentation: Gravity attribute

Properties

AxisClipMirrors android:gravity="axisClip".
AxisPullAfterMirrors android:gravity="axisPullAfter".
AxisPullBeforeMirrors android:gravity="axisPullBefore".
AxisSpecifiedMirrors android:gravity="axisSpecified".
AxisXShiftMirrors android:gravity="axisXShift".
AxisYShiftMirrors android:gravity="axisYShift".
BottomMirrors android:gravity="bottom".
CenterMirrors android:gravity="center".
CenterHorizontalMirrors android:gravity="centerHorizontal".
CenterVerticalMirrors android:gravity="centerVertical".
ClipHorizontalMirrors android:gravity="clipHorizontal".
ClipVerticalMirrors android:gravity="clipVertical".
DisplayClipHorizontalMirrors android:gravity="displayClipHorizontal".
DisplayClipVerticalMirrors android:gravity="displayClipVertical".
EndMirrors android:gravity="end".
FillMirrors android:gravity="fill".
FillHorizontalMirrors android:gravity="fillHorizontal".
FillVerticalMirrors android:gravity="fillVertical".
HorizontalGravityMaskMirrors android:gravity="horizontalGravityMask".
LeftMirrors android:gravity="left".
NoGravityMirrors android:gravity="noGravity".
RelativeHorizontalGravityMaskMirrors android:gravity="relativeHorizontalGravityMask".
RelativeLayoutDirectionMirrors android:gravity="relativeLayoutDirection".
RightMirrors android:gravity="right".
StartMirrors android:gravity="start".
TopMirrors android:gravity="top".
VerticalGravityMaskMirrors android:gravity="verticalGravityMask".