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 showToast(Context context, String text, boolean isLong) { Toast.makeText(context, text, isLong ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT).show(); }
From source file:Main.java
/** * Make long toast./*www. j ava 2 s .c om*/ * * @param ctx the ctx * @param message the message */ public static void makeLongToast(Context ctx, String message) { if (ctx != null && message != null) { Toast toast = Toast.makeText(ctx, message, Toast.LENGTH_LONG); toast.setGravity(Gravity.CENTER, 0, 50); toast.show(); } }
From source file:Main.java
public static void toastLong(Context context, String message) { if (!TextUtils.isEmpty(message)) { Toast.makeText(context, message, Toast.LENGTH_LONG).show(); }//from w w w . j a va 2s.co m }
From source file:Main.java
public static void show(Context context, int info) { Toast t = Toast.makeText(context, info, Toast.LENGTH_LONG); t.setGravity(Gravity.CENTER, 0, 0);/* ww w. ja v a 2 s . c o m*/ t.show(); }
From source file:Main.java
public static void showMessage(Context context, String message) { if (context != null) { Toast.makeText(context, message, Toast.LENGTH_LONG).show(); }//from w ww. jav a 2 s . c o m }
From source file:Main.java
private static void showToast(final Context context, final int resId) { Handler handler = new Handler(Looper.getMainLooper()); handler.post(new Runnable() { @Override/*from w w w . ja v a 2s . c o m*/ public void run() { Toast.makeText(context, resId, Toast.LENGTH_LONG).show(); } }); }
From source file:Main.java
private static void showToast(Context context, CharSequence text) { Toast.makeText(context, text, Toast.LENGTH_LONG).show(); }
From source file:Main.java
public static void showLong(Context context, int message) { if (showToast) Toast.makeText(context, message, Toast.LENGTH_LONG).show(); }
From source file:Main.java
public static void showLToast(Context context, int resId) { Toast toast = Toast.makeText(context, resId, Toast.LENGTH_LONG); ;//from w ww . jav a 2 s. co m toast.setGravity(Gravity.CENTER, 0, 0); toast.show(); }
From source file:Main.java
/** * General Purpose Toast*///from ww w. jav a 2s. co m public static void showToast(Context context, int resId) { Toast.makeText(context, resId, Toast.LENGTH_LONG).show(); }