Freigeben über


Gravity.ApplyDisplay Method

Definition

Overloads

ApplyDisplay(GravityFlags, Rect, Rect)

Apply additional gravity behavior based on the overall "display" that an object exists in.

ApplyDisplay(GravityFlags, Rect, Rect, Int32)

Apply additional gravity behavior based on the overall "display" that an object exists in.

ApplyDisplay(GravityFlags, Rect, Rect)

Apply additional gravity behavior based on the overall "display" that an object exists in.

[Android.Runtime.Register("applyDisplay", "(ILandroid/graphics/Rect;Landroid/graphics/Rect;)V", "")]
public static void ApplyDisplay (Android.Views.GravityFlags gravity, Android.Graphics.Rect display, Android.Graphics.Rect inoutObj);
[<Android.Runtime.Register("applyDisplay", "(ILandroid/graphics/Rect;Landroid/graphics/Rect;)V", "")>]
static member ApplyDisplay : Android.Views.GravityFlags * Android.Graphics.Rect * Android.Graphics.Rect -> unit

Parameters

gravity
GravityFlags

Gravity constants to modify the placement within the display.

display
Rect

The rectangle of the display in which the object is being placed.

inoutObj
Rect

Supplies the current object position; returns with it modified if needed to fit in the display.

Attributes

Remarks

Apply additional gravity behavior based on the overall "display" that an object exists in. This can be used after #apply(int, int, int, Rect, int, int, Rect) to place the object within a visible display. By default this moves or clips the object to be visible in the display; the gravity flags #DISPLAY_CLIP_HORIZONTAL and #DISPLAY_CLIP_VERTICAL can be used to change this behavior.

Java documentation for android.view.Gravity.applyDisplay(int, android.graphics.Rect, android.graphics.Rect).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

ApplyDisplay(GravityFlags, Rect, Rect, Int32)

Apply additional gravity behavior based on the overall "display" that an object exists in.

[Android.Runtime.Register("applyDisplay", "(ILandroid/graphics/Rect;Landroid/graphics/Rect;I)V", "")]
public static void ApplyDisplay (Android.Views.GravityFlags gravity, Android.Graphics.Rect display, Android.Graphics.Rect inoutObj, int layoutDirection);
[<Android.Runtime.Register("applyDisplay", "(ILandroid/graphics/Rect;Landroid/graphics/Rect;I)V", "")>]
static member ApplyDisplay : Android.Views.GravityFlags * Android.Graphics.Rect * Android.Graphics.Rect * int -> unit

Parameters

gravity
GravityFlags

Gravity constants to modify the placement within the display.

display
Rect

The rectangle of the display in which the object is being placed.

inoutObj
Rect

Supplies the current object position; returns with it modified if needed to fit in the display.

layoutDirection
Int32

The layout direction.

Attributes

Remarks

Apply additional gravity behavior based on the overall "display" that an object exists in. This can be used after #apply(int, int, int, Rect, int, int, Rect) to place the object within a visible display. By default this moves or clips the object to be visible in the display; the gravity flags #DISPLAY_CLIP_HORIZONTAL and #DISPLAY_CLIP_VERTICAL can be used to change this behavior.

Java documentation for android.view.Gravity.applyDisplay(int, android.graphics.Rect, android.graphics.Rect, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

See also

Applies to