List of usage examples for android.widget Toast LENGTH_LONG
int LENGTH_LONG
To view the source code for android.widget Toast LENGTH_LONG.
Click Source Link
From source file:Main.java
public static void Toast_make(Context context, int showcontent) { Toast.makeText(context, showcontent, Toast.LENGTH_LONG).show(); }
From source file:Main.java
public static void showLongToast(Context mContext, @StringRes int resId) { Toast.makeText(mContext, resId, Toast.LENGTH_LONG).show(); }
From source file:Main.java
/** * Show no Info alert dialog/*www. j a v a2s. co m*/ * * @param context current Activity context * @param msg message to be shown on the alert dialog */ public static void showNoInfoAlertToast(Activity context, Spanned msg) { Toast.makeText(context, msg, Toast.LENGTH_LONG).show(); }
From source file:Main.java
/** * This will display the message as a long toast * @param currentActivity - the activity you are calling this from * @param message - the message to display *//* w ww . j av a2 s . c om*/ public static void toastLong(Context currentActivity, String message) { Toast.makeText(currentActivity, message, Toast.LENGTH_LONG).show(); }
From source file:Main.java
/** * This method provides uniform exception handling functionality * @param context//from w w w . j a v a 2 s . com * @param e * @param errmsg */ public static void handleException(Context context, Exception e, String errmsg) { Toast.makeText(context, "(e) " + errmsg, Toast.LENGTH_LONG).show(); Log.e("Yum Exception!", errmsg); Log.e("Yum Exception!", e.toString()); }
From source file:Main.java
public static void showErrorMessage(Context context, int message, Object... args) { Toast.makeText(context, context.getString(message, args), Toast.LENGTH_LONG).show(); }
From source file:Main.java
public static void showLongToast(Context context, CharSequence message) { if (context == null) return;/* w ww . j a va2 s .co m*/ if (mToast == null) { mToast = getToastObj(context); } mToast.setText(message); mToast.setDuration(Toast.LENGTH_LONG); mToast.show(); }
From source file:Main.java
static final void toastLong(String mesg) { if (null != curToast) { curToast.cancel();//from ww w .j ava2 s. c o m } curToast = Toast.makeText(curContext, mesg, Toast.LENGTH_LONG); curToast.show(); }
From source file:Main.java
/** * Displays a message toast/* w ww .j a v a 2s . c o m*/ * * @param context * The context the toast is displayed * @param text * The text contained in the toast */ public static void createToast(Context context, String text) { Toast.makeText(context, text, Toast.LENGTH_LONG).show(); }
From source file:Main.java
public static void Toast(Context context, String text) { Toast toast = Toast.makeText(context, text, Toast.LENGTH_LONG); toast.show(); }