Toast.SetGravity(GravityFlags, Int32, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Set the location at which the notification should appear on the screen.
[Android.Runtime.Register("setGravity", "(III)V", "GetSetGravity_IIIHandler")]
public virtual void SetGravity (Android.Views.GravityFlags gravity, int xOffset, int yOffset);
[<Android.Runtime.Register("setGravity", "(III)V", "GetSetGravity_IIIHandler")>]
abstract member SetGravity : Android.Views.GravityFlags * int * int -> unit
override this.SetGravity : Android.Views.GravityFlags * int * int -> unit
Parameters
- gravity
- GravityFlags
- xOffset
- Int32
- yOffset
- Int32
- Attributes
Remarks
Set 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 is a no-op when called on text toasts.
Java documentation for android.widget.Toast.setGravity(int, int, 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.