Sdílet prostřednictvím


BitmapDrawable.Gravity Property

Definition

Get the gravity used to position/stretch the bitmap within its bounds. -or- Set the gravity used to position/stretch the bitmap within its bounds.

public virtual Android.Views.GravityFlags Gravity { [Android.Runtime.Register("getGravity", "()I", "GetGetGravityHandler")] get; [Android.Runtime.Register("setGravity", "(I)V", "GetSetGravity_IHandler")] set; }
[<get: Android.Runtime.Register("getGravity", "()I", "GetGetGravityHandler")>]
[<set: Android.Runtime.Register("setGravity", "(I)V", "GetSetGravity_IHandler")>]
member this.Gravity : Android.Views.GravityFlags with get, set

Property Value

the gravity applied to the bitmap

Attributes

Remarks

Property getter documentation:

Get the gravity used to position/stretch the bitmap within its bounds. See android.view.Gravity

Java documentation for android.graphics.drawable.BitmapDrawable.getGravity().

Property setter documentation:

Set the gravity used to position/stretch the bitmap within its bounds. See android.view.Gravity

Java documentation for android.graphics.drawable.BitmapDrawable.setGravity(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.

Applies to