From dda8168861b3d6a628dd3c496f7f44da1263b5ec Mon Sep 17 00:00:00 2001 From: Viktor Govako Date: Wed, 24 Aug 2022 12:48:10 +0300 Subject: [PATCH] [android] Fixed possible crash. Signed-off-by: Viktor Govako --- .../util/bottomsheet/MenuBottomSheetFragment.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/android/src/com/mapswithme/util/bottomsheet/MenuBottomSheetFragment.java b/android/src/com/mapswithme/util/bottomsheet/MenuBottomSheetFragment.java index 2aba5c3079..b6e290fe22 100644 --- a/android/src/com/mapswithme/util/bottomsheet/MenuBottomSheetFragment.java +++ b/android/src/com/mapswithme/util/bottomsheet/MenuBottomSheetFragment.java @@ -55,6 +55,16 @@ public class MenuBottomSheetFragment extends BottomSheetDialogFragment this.menuBottomSheetItems = new ArrayList<>(); } + // https://stackoverflow.com/questions/51831053/could-not-find-fragment-constructor + public MenuBottomSheetFragment() + { + this.title = null; + this.headerFragment = null; + /// @todo Make an empty list as in ctor above. Can we leave it null and don't create MenuAdapter? + /// What is the reason of MenuAdapter with empty items list? + this.menuBottomSheetItems = new ArrayList<>(); + } + @Override public void onCreate(@Nullable Bundle savedInstanceState) {