@Override public Dialog build(Context context) { mDialog = onBuild(context, mStyleId); mDialog .title(mTitle) .positiveAction(mPositive) .negativeAction(mNegative) .neutralAction(mNeutral); if (mContentViewId != 0) mDialog.contentView(mContentViewId); return mDialog; }
public void run() { // dirty fix for java.lang.IllegalArgumentException: View not attached to window manager try { Dialog.super.dismiss(); } catch (IllegalArgumentException ex) { } }