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 displayMessage(Activity contextActivity, int messageId) { Toast.makeText(contextActivity, messageId, Toast.LENGTH_LONG).show(); }
From source file:Main.java
/** * Shows a (long) toast */ public static void showToast(Context context, String msg) { Toast.makeText(context, msg, Toast.LENGTH_LONG).show(); }
From source file:Main.java
public static void longT(Context context, CharSequence text) { createToast(context);//from www . j a va 2s.c o m sToast.setDuration(Toast.LENGTH_LONG); sToast.setText(text); sToast.show(); }
From source file:Main.java
public static void showFormattedToast(Context context, int id, Object... args) { Toast.makeText(context, String.format(context.getText(id).toString(), args), Toast.LENGTH_LONG).show(); }
From source file:Main.java
public static void toast(int messageId, Context context) { if (context != null) { Toast.makeText(context, context.getResources().getString(messageId), Toast.LENGTH_LONG).show(); }//from w w w . ja v a 2 s .c om }
From source file:Main.java
public static void startReview(Context context) { Intent intent = new Intent(Intent.ACTION_VIEW, getReviewUri(context)); if (isIntentAvailable(context, intent)) { context.startActivity(intent);// ww w.j a v a 2s . c o m setReviewDone(context, true); } else { setReviewDone(context, false); Toast.makeText(context, "Network Error", Toast.LENGTH_LONG).show(); } }
From source file:Main.java
public static void makeToast(Context context, String msg) { try {// w w w . jav a 2 s . c om if (LOG_TOAST) { Toast.makeText(context, "message : " + msg, Toast.LENGTH_LONG).show(); } } catch (Exception e) { e.printStackTrace(); } }
From source file:Main.java
public static void feedback(Context context, String feedBackEmailId, String emailSubject, String msg) { Intent emailIntent = new Intent(Intent.ACTION_SEND); emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[] { feedBackEmailId }); emailIntent.putExtra(Intent.EXTRA_SUBJECT, emailSubject); emailIntent.putExtra(Intent.EXTRA_TEXT, msg); emailIntent.setType("message/rfc822"); emailIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); if (isIntentAvailable(context, emailIntent)) { context.startActivity(emailIntent); } else {//from ww w . j a v a 2s . c om Toast.makeText(context, "No Email Application Found", Toast.LENGTH_LONG).show(); } }
From source file:Main.java
public static void showToastLong(Context ctx, int rid) { Toast.makeText(ctx, ctx.getString(rid), Toast.LENGTH_LONG).show(); }
From source file:Main.java
public static void showToast(Context context, int id, boolean longToast) { Toast.makeText(context, id, longToast ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT).show(); }