Android.Views.Gravity.Apply Method
Apply a gravity constant to an object.

Syntax

[Android.Runtime.Register("apply", "(IIILandroid/graphics/Rect;IILandroid/graphics/Rect;)V", "")]
public static void Apply ([Android.Runtime.GeneratedEnum] GravityFlags gravity, int w, int h, Android.Graphics.Rect container, int xAdj, int yAdj, Android.Graphics.Rect outRect)

Parameters

gravity
The desired placement of the object, as defined by the constants in this class.
w
The horizontal size of the object.
h
The vertical size of the object.
container
The frame of the containing space, in which the object will be placed. Should be large enough to contain the width and height of the object.
xAdj
Offset to apply to the X axis. If gravity is LEFT this pushes it to the right; if gravity is RIGHT it pushes it to the left; if gravity is CENTER_HORIZONTAL it pushes it to the right or left; otherwise it is ignored.
yAdj
Offset to apply to the Y axis. If gravity is TOP this pushes it down; if gravity is BOTTOM it pushes it up; if gravity is CENTER_VERTICAL it pushes it down or up; otherwise it is ignored.
outRect
Receives the computed frame of the object in its container.

Remarks

Apply a gravity constant to an object.

[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