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

public static void displayToast(String textToDisplay, Context context) {
    Toast.makeText(context, textToDisplay, Toast.LENGTH_LONG).show();
}

From source file:Main.java

public static void toast(Context context, String content, int duration) {
    Toast.makeText(context, content, duration).show();
}

From source file:Main.java

public static void showToast(Context con, String showMsg, boolean isLong) {
    Toast.makeText(con, showMsg, isLong ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT).show();
}

From source file:Main.java

public static void showToast(Context con, String message) {
    Toast toast = Toast.makeText(con, message, Toast.LENGTH_LONG);
    toast.show();
}

From source file:Main.java

public static void showToast(String message, int time, Context context) {
    Toast.makeText(context, message, time).show();
}

From source file:Main.java

public static void showToast(Context context, int id, int millisTime) {
    Toast.makeText(context, context.getText(id), millisTime).show();
}

From source file:Main.java

public static void showToast(Context context, String msg) {
    Toast.makeText(context, msg, Toast.LENGTH_LONG).show();
}

From source file:Main.java

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

From source file:Main.java

public static final void toast(Context context, String text, int duration) {
    Toast.makeText(context, text, duration).show();
}

From source file:Main.java

public static void showToastLong(Context appContext, String message) {

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