if (superToast.isShowing()) { try{ ((SuperActivityToast) superToast).getViewGroup().removeView(superToast.getView()); ((SuperActivityToast) superToast).getViewGroup().invalidate(); } catch (NullPointerException|IllegalStateException exception) { Log.e(getClass().getName(), exception.toString());
@Override public void onAnimationEnd(Animator animation) { if (superToast.getOnDismissListener() != null) { superToast.getOnDismissListener().onDismiss(superToast.getView(), superToast.getStyle().dismissToken); } ((SuperActivityToast) superToast).getViewGroup().removeView(superToast.getView()); // Show the next SuperToast if any exist Toaster.this.showNextSuperToast(); }
if (((SuperActivityToast) superToast).getViewGroup() == null) { Log.e(getClass().getName(), ERROR_SAT_VIEWGROUP_NULL); return; ((SuperActivityToast) superToast).getViewGroup().addView(superToast.getView());