Example usage for android.widget Toast LENGTH_LONG

List of usage examples for android.widget Toast LENGTH_LONG

Introduction

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

Prototype

int LENGTH_LONG

To view the source code for android.widget Toast LENGTH_LONG.

Click Source Link

Document

Show the view or text notification for a long period of time.

Usage

From source file:Main.java

public static void makeLongToast(Context context, CharSequence text) {

    Toast.makeText(context, text, Toast.LENGTH_LONG).show();

}

From source file:Main.java

public static void showMsgBox(Context context, int resId) {
    Toast.makeText(context, context.getString(resId), Toast.LENGTH_LONG).show();
}

From source file:Main.java

public static void internetErrorMessage(Context ctx) {

    Toast.makeText(ctx, "Error In Internet Connection", Toast.LENGTH_LONG).show();
}

From source file:Main.java

public static void showToastLong(String msg, Context ctx) {
    try {//  ww  w. j  av  a2s. c  om
        Toast.makeText(ctx, msg, Toast.LENGTH_LONG).show();
    } catch (Exception e) {
        e.printStackTrace();
    }
}

From source file:Main.java

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

    Toast.makeText(appContext, message, Toast.LENGTH_LONG).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 displayToast(String textToDisplay, Context context) {
    Toast.makeText(context, textToDisplay, Toast.LENGTH_LONG).show();
}

From source file:Main.java

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

From source file:Main.java

public static void displayErrorMessage(Context context) {
    Toast.makeText(context, "Input field must not be zero", Toast.LENGTH_LONG).show();
}

From source file:Main.java

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