From 37042f1a93242db26a7e8085faecd47ab029dcd6 Mon Sep 17 00:00:00 2001 From: ruben Date: Sat, 27 Aug 2016 18:49:27 +0100 Subject: [PATCH] Don't cancel onCancel if user clicks in a menu item --- .../rubensousa/bottomsheetbuilder/BottomSheetMenuDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/java/com/github/rubensousa/bottomsheetbuilder/BottomSheetMenuDialog.java b/library/src/main/java/com/github/rubensousa/bottomsheetbuilder/BottomSheetMenuDialog.java index 18fc64b..82ba076 100644 --- a/library/src/main/java/com/github/rubensousa/bottomsheetbuilder/BottomSheetMenuDialog.java +++ b/library/src/main/java/com/github/rubensousa/bottomsheetbuilder/BottomSheetMenuDialog.java @@ -152,7 +152,7 @@ public void onStateChanged(@NonNull View bottomSheet, BottomSheetMenuDialog.super.dismiss(); // User dragged the sheet. - if (!mRequestDismiss && !mRequestCancel && mOnCancelListener != null) { + if (!mClicked && !mRequestDismiss && !mRequestCancel && mOnCancelListener != null) { mOnCancelListener.onCancel(BottomSheetMenuDialog.this); } }