public final class

Toast

extends Object
java.lang.Object
   ↳ com.neomades.app.Toast

Class Overview

A toast is a view containing a quick little message for the user. The toast will appear as a floating view over the application. It cannot take the focus and it will disappear automatically after a few seconds.

Summary

Public Methods
static void showText(int textId, int duration)
Make a standard toast that just displays a text view with a text from the resource file with a specific display time.
static void showText(String text, int duration)
Make a standard toast that just contains a text view with a specific display time.
static void showText(int textId)
Make a standard toast that just displays a text view with a text from the resource file.
static void showText(String text)
Make a standard toast that just contains a text view.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static void showText (int textId, int duration)

Make a standard toast that just displays a text view with a text from the resource file with a specific display time.

Parameters
textId the text resource id
duration display time of the toast in milliseconds

public static void showText (String text, int duration)

Make a standard toast that just contains a text view with a specific display time.

Parameters
text the text of the toast
duration display time of the toast in milliseconds

public static void showText (int textId)

Make a standard toast that just displays a text view with a text from the resource file. The toast will be shown during 2 seconds.

Parameters
textId the text resource id

public static void showText (String text)

Make a standard toast that just contains a text view. The toast will be shown during 2 seconds.

Parameters
text the text of the toast