Android Guides | Samples

Android.Views.Gravity Class

Standard constants and tools for placing an object within a potentially larger container.

See Also: Gravity

Syntax

[Android.Runtime.Register("android/view/Gravity", DoNotGenerateAcw=true)]
public class Gravity : Object

Remarks

Standard constants and tools for placing an object within a potentially larger container.

[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

The members of Android.Views.Gravity are listed below.

See Also: Object

Public Constructors

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

static
Apply(GravityFlags, Int32, Int32, Rect, Rect)
Apply a gravity constant to an object.
static
Apply(GravityFlags, Int32, Int32, Rect, Rect, Int32)
Apply a gravity constant to an object and take care if layout direction is RTL or not.
static
Apply(GravityFlags, Int32, Int32, Rect, Int32, Int32, Rect)
Apply a gravity constant to an object.
static
Apply(GravityFlags, Int32, Int32, Rect, Int32, Int32, Rect, Int32)
Apply a gravity constant to an object.
static
ApplyDisplay(GravityFlags, Rect, Rect)
Apply additional gravity behavior based on the overall "display" that an object exists in.
static
ApplyDisplay(GravityFlags, Rect, Rect, Int32)
Apply additional gravity behavior based on the overall "display" that an object exists in.
static
GetAbsoluteGravity(GravityFlags, GravityFlags) : GravityFlags
if horizontal direction is LTR, then START will set LEFT and END will set RIGHT. if horizontal direction is RTL, then START will set RIGHT and END will set LEFT.
static
IsHorizontal(GravityFlags) : Boolean
static
IsVertical(GravityFlags) : Boolean