Example usage for android.widget Toast makeText

List of usage examples for android.widget Toast makeText

Introduction

In this page you can find the example usage for android.widget Toast makeText.

Prototype

public static Toast makeText(Context context, @StringRes int resId, @Duration int duration)
        throws Resources.NotFoundException 

Source Link

Document

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

Usage

From source file:Main.java

private static void show(Context context, int resId, int duration) {
    Toast.makeText(context, resId, duration).show();
}

From source file:Main.java

public static void showErrorMessage(Context context, Throwable ex) {
    Toast.makeText(context, ex.getLocalizedMessage(), Toast.LENGTH_LONG).show();
}

From source file:Main.java

public static void showToastShort(Context context, String message) {
    Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
}

From source file:Main.java

public static void showToastMessage(Context context, String message) {
    Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
}

From source file:Main.java

public static void showMessageByToast(Context context, String text) {
    Toast.makeText(context, text, Toast.LENGTH_SHORT).show();
}

From source file:Main.java

public static void makeToast(Activity currentActivity, String message) {
    Toast.makeText(currentActivity.getApplicationContext(), message, Toast.LENGTH_SHORT).show();

}

From source file:Main.java

public static void makeToast(Context context, CharSequence message) {
    Toast.makeText(context, message, Toast.LENGTH_LONG).show();
}

From source file:Main.java

public static void showToastMessage(int msgId, Context context) {
    Toast.makeText(context, msgId, Toast.LENGTH_SHORT).show();
}

From source file:Main.java

public static void showToast(Context paramContext, int paramInt) {
    Toast.makeText(paramContext, paramInt, 0).show();
}

From source file:Main.java

public static void showLongToast(Context context, String message) {

    Toast.makeText(context, message, Toast.LENGTH_LONG).show();
}