Version: 2023.2
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".
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961