invissvenska/ModalBottomSheetDialog

When you click the button twice quickly, it'll cause java.lang.IllegalStateException: Fragment already added;

Closed this issue · 1 comments

When you click the button twice quickly, it'll cause java.lang.IllegalStateException: Fragment already added;

You can wrap the ModalBottomSheetDialog.show(manager, tag) with an isAdded() check.

if (!dismissibleDialog.isAdded()) {
    dismissibleDialog.show(getSupportFragmentManager(), "WithHeader");
} else {
    // modal has already been added
}