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

From source file:Main.java

public static void showToast(Context ctxt, String message) {
    if (ctxt != null)
        Toast.makeText(ctxt, message, Toast.LENGTH_LONG).show();
}

From source file:Main.java

public static void showToast(Context c, String str) {
    Toast toast = Toast.makeText(c, str, Toast.LENGTH_LONG);
    toast.setGravity(Gravity.CENTER, toast.getXOffset() / 2, toast.getYOffset() / 2);
    toast.show();/*from   w ww. j ava  2  s.c om*/
}

From source file:Main.java

public static void invalidDieToast(Context ctx) {
    Toast.makeText(ctx, "Please enter valid hit point value or hit die expression.", Toast.LENGTH_LONG).show();
}

From source file:Main.java

public static void toastLong(Context context, int text) {
    Toast.makeText(context, text, Toast.LENGTH_LONG).show();
}

From source file:Main.java

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

From source file:Main.java

public static void toastL(Context context, String msg) {
    toast(context, msg, Toast.LENGTH_LONG);
}

From source file:Main.java

public static void show(Context context, String info) {
    Toast t = Toast.makeText(context, info, Toast.LENGTH_LONG);
    t.setGravity(Gravity.CENTER, 0, 0);
    t.show();
}

From source file:Main.java

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

From source file:Main.java

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