Toast.MakeText Toast.MakeText Method

Definition

Overloads

MakeText(Context, ICharSequence, ToastLength) MakeText(Context, ICharSequence, ToastLength)

Make a standard toast that just contains a text view.

MakeText(Context, Int32, ToastLength) MakeText(Context, Int32, ToastLength)

Make a standard toast that just contains a text view with the text from a resource.

MakeText(Context, String, ToastLength) MakeText(Context, String, ToastLength)

MakeText(Context, ICharSequence, ToastLength) MakeText(Context, ICharSequence, ToastLength)

Make a standard toast that just contains a text view.

[Android.Runtime.Register("makeText", "(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;", "")]
public static Android.Widget.Toast MakeText (Android.Content.Context context, Java.Lang.ICharSequence text, Android.Widget.ToastLength duration);
static member MakeText : Android.Content.Context * Java.Lang.ICharSequence * Android.Widget.ToastLength -> Android.Widget.Toast

Parameters

context
Context Context

The context to use. Usually your Application or Activity object.

text
ICharSequence ICharSequence

The text to show. Can be formatted text.

duration
ToastLength ToastLength

How long to display the message. Either Short or Long

Returns

Remarks

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.

MakeText(Context, Int32, ToastLength) MakeText(Context, Int32, ToastLength)

Make a standard toast that just contains a text view with the text from a resource.

[Android.Runtime.Register("makeText", "(Landroid/content/Context;II)Landroid/widget/Toast;", "")]
public static Android.Widget.Toast MakeText (Android.Content.Context context, int resId, Android.Widget.ToastLength duration);
static member MakeText : Android.Content.Context * int * Android.Widget.ToastLength -> Android.Widget.Toast

Parameters

context
Context Context

The context to use. Usually your Application or Activity object.

resId
Int32 Int32

The resource id of the string resource to use. Can be formatted text.

duration
ToastLength ToastLength

How long to display the message. Either Short or Long

Returns

Exceptions

Remarks

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.

MakeText(Context, String, ToastLength) MakeText(Context, String, ToastLength)

public static Android.Widget.Toast MakeText (Android.Content.Context context, string text, Android.Widget.ToastLength duration);
static member MakeText : Android.Content.Context * string * Android.Widget.ToastLength -> Android.Widget.Toast

Parameters

context
Context Context
text
String String

Returns

Remarks

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