diff --git a/plugin-places/src/main/java/com/mapbox/mapboxsdk/plugins/places/picker/ui/CurrentPlaceSelectionBottomSheet.java b/plugin-places/src/main/java/com/mapbox/mapboxsdk/plugins/places/picker/ui/CurrentPlaceSelectionBottomSheet.java index ac7bac2be..5524d4f15 100644 --- a/plugin-places/src/main/java/com/mapbox/mapboxsdk/plugins/places/picker/ui/CurrentPlaceSelectionBottomSheet.java +++ b/plugin-places/src/main/java/com/mapbox/mapboxsdk/plugins/places/picker/ui/CurrentPlaceSelectionBottomSheet.java @@ -77,7 +77,8 @@ public boolean isShowing() { private void toggleBottomSheet() { bottomSheetBehavior.setPeekHeight(rootView.findViewById(R.id.bottom_sheet_header).getHeight()); - bottomSheetBehavior.setHideable(isShowing()); - bottomSheetBehavior.setState(isShowing() ? STATE_HIDDEN : STATE_COLLAPSED); + boolean isShowing = isShowing(); + bottomSheetBehavior.setHideable(isShowing); + bottomSheetBehavior.setState(isShowing ? STATE_HIDDEN : STATE_COLLAPSED); } } \ No newline at end of file