forked from organicmaps/organicmaps
[android] Properly implemented BottomSheetCallback
Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
parent
3aeec8931d
commit
76a49b126f
1 changed files with 2 additions and 1 deletions
|
@ -93,7 +93,7 @@ public class BottomSheetMenuController implements MenuController
|
|||
View sheet = view.findViewById(mSheetResId);
|
||||
Objects.requireNonNull(sheet);
|
||||
mSheetBehavior = BottomSheetBehavior.from(sheet);
|
||||
mSheetBehavior.setBottomSheetCallback(mSheetCallback);
|
||||
mSheetBehavior.addBottomSheetCallback(mSheetCallback);
|
||||
mSheetBehavior.setState(BottomSheetBehavior.STATE_HIDDEN);
|
||||
GestureDetectorCompat gestureDetector = new GestureDetectorCompat(
|
||||
view.getContext(), new BottomSheetMenuGestureListener(mSheetBehavior));
|
||||
|
@ -104,6 +104,7 @@ public class BottomSheetMenuController implements MenuController
|
|||
@Override
|
||||
public void destroy()
|
||||
{
|
||||
mSheetBehavior.removeBottomSheetCallback(mSheetCallback);
|
||||
mMenuRenderer.destroy();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue