Android Guides | Samples

Android.Views.WindowManagerLayoutParams.Gravity Property

Placement of window within the screen as per Gravity.

Syntax

[Android.Runtime.Register("gravity")]
public GravityFlags Gravity { get; set; }

See Also

Remarks

Placement of window within the screen as per Gravity. Both Gravity.Apply(GravityFlags,Int32,Int32,Int32,Int32,Int32,Int32) and Gravity.ApplyDisplay(GravityFlags,Rect,Rect) are used during window layout, with this value given as the desired gravity. For example you can specify Gravity.DISPLAY_CLIP_HORIZONTAL and Gravity.DISPLAY_CLIP_VERTICAL here to control the behavior of Gravity.ApplyDisplay(GravityFlags,Rect,Rect).

[Android Documentation]

Requirements

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