Android.Widget.RelativeLayout.SetGravity Method
Describes how the child views are positioned.

Syntax

[Android.Runtime.Register("setGravity", "(I)V", "GetSetGravity_IHandler")]
public virtual void SetGravity ([Android.Runtime.GeneratedEnum] Android.Views.GravityFlags gravity)

See Also

RelativeLayout.SetHorizontalGravity(Android.Views.GravityFlags)
RelativeLayout.SetVerticalGravity(Android.Views.GravityFlags)

Parameters

gravity
See Android.Views.Gravity

Remarks

Describes how the child views are positioned. Defaults to Gravity.START | Gravity.TOP.

Note that since RelativeLayout considers the positioning of each child relative to one another to be significant, setting gravity will affect the positioning of all children as a single unit within the parent. This happens after children have been relatively positioned.

[Android Documentation]

Requirements

Namespace: Android.Widget
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1