Condividi tramite


Toast.Gravity Property

Definition

Get the location at which the notification should appear on the screen.

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

Property Value

Attributes

Remarks

Get the location at which the notification should appear on the screen.

<strong>Warning:</strong> Starting from Android Build.VERSION_CODES#R, for apps targeting API level Build.VERSION_CODES#R or higher, this method shouldn't be called on text toasts as its return value may not reflect actual value since text toasts are not rendered by the app anymore.

Java documentation for android.widget.Toast.getGravity().

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

See also