/** * Dismisses the {@value #TAG}. */ public void dismiss() { ManagerSuperCardToast.getInstance().remove(this); dismissWithAnimation(); }
/** * Dismisses the {@value #TAG}. */ public void dismiss() { ManagerSuperToast.getInstance().removeSuperToast(this); }
/** * Dismisses the {@value #TAG}. */ public void dismiss() { ManagerSuperActivityToast.getInstance().removeSuperToast(this); }
/** * Private method used to set a default style to the {@value #TAG} */ private void setStyle(Style style) { this.setAnimations(style.animations); this.setTypefaceStyle(style.typefaceStyle); this.setTextColor(style.textColor); this.setBackground(style.background); if (this.mType == Type.BUTTON) { this.setDividerColor(style.dividerColor); this.setButtonTextColor(style.buttonTextColor); } }
public void run() { toast.show(); } });
/** * Private method used to set a default style to the {@value #TAG} */ private void setStyle(Style style) { this.setAnimations(style.animations); this.setTypefaceStyle(style.typefaceStyle); this.setTextColor(style.textColor); this.setBackground(style.background); }
/** * Dismisses and removes all showing/pending {@value #TAG}. */ public static void cancelAllSuperToasts() { ManagerSuperToast.getInstance().cancelAllSuperToasts(); }
/** * Dismisses and removes all showing/pending SuperCardToasts. */ public static void cancelAllSuperCardToasts() { ManagerSuperCardToast.getInstance().cancelAllSuperActivityToasts(); }
/** * Shows the {@value #TAG}. If another {@value #TAG} is showing than * this one will be added to a queue and shown when the previous {@value #TAG} * is dismissed. */ public void show() { ManagerSuperActivityToast.getInstance().add(this); }
/** * Dismisses and removes all pending/showing {@value #TAG}. */ public static void cancelAllSuperActivityToasts() { ManagerSuperActivityToast.getInstance().cancelAllSuperActivityToasts(); }
/** * Dismisses and removes all pending/showing {@value #TAG} * for a specific activity. * * @param activity {@link android.app.Activity} */ public static void clearSuperActivityToastsForActivity(Activity activity) { ManagerSuperActivityToast.getInstance() .cancelAllSuperActivityToastsForActivity(activity); }
private void sendMessageDelayed(SuperToast superToast, final int messageId, final long delay) { Message message = obtainMessage(messageId); message.obj = superToast; sendMessageDelayed(message, delay); }
@Override public void onDismiss(View view) { dismissImmediately(); }
private long getDuration(SuperToast superToast) { long duration = superToast.getDuration(); duration += 1000; return duration; }
/** * Singleton method to ensure all SuperCardToasts are passed through the same manager. */ protected static synchronized ManagerSuperCardToast getInstance() { if (mManagerSuperCardToast != null) { return mManagerSuperCardToast; } else { mManagerSuperCardToast = new ManagerSuperCardToast(); return mManagerSuperCardToast; } }
protected static synchronized ManagerSuperToast getInstance() { if (mManagerSuperToast != null) { return mManagerSuperToast; } else { mManagerSuperToast = new ManagerSuperToast(); return mManagerSuperToast; } }
/** * Singleton method to ensure all SuperActivityToasts are passed through the same manager. */ protected static synchronized ManagerSuperActivityToast getInstance() { if (mManagerSuperActivityToast != null) { return mManagerSuperActivityToast; } else { mManagerSuperActivityToast = new ManagerSuperActivityToast(); return mManagerSuperActivityToast; } }
@Override public void onDismiss(View view) { mOnDismissListener.onDismiss(view); }
public void run() { toast.show(); } });
@Override public void run() { dismissImmediately(); }