boolean () { DialogWrapper currentDialog = DialogWrapper.findInstanceFromFocus(); if (currentDialog != null && (currentDialog.getWindow().getWidth() < 500 || currentDialog.getWindow().getHeight() < 500)) { return false; } return true; }