diff --git a/android/src/com/mapswithme/maps/widget/placepage/DefaultBottomSheetCallback.java b/android/src/com/mapswithme/maps/widget/placepage/DefaultBottomSheetCallback.java index b9ab35b7a1..7050544f7b 100644 --- a/android/src/com/mapswithme/maps/widget/placepage/DefaultBottomSheetCallback.java +++ b/android/src/com/mapswithme/maps/widget/placepage/DefaultBottomSheetCallback.java @@ -6,7 +6,6 @@ import androidx.annotation.NonNull; import com.google.android.material.bottomsheet.BottomSheetBehavior; import com.mapswithme.util.log.Logger; -import static com.mapswithme.maps.widget.placepage.PlacePageUtils.isHalfExpandedState; import static com.mapswithme.maps.widget.placepage.PlacePageUtils.isExpandedState; public class DefaultBottomSheetCallback extends BottomSheetBehavior.BottomSheetCallback @@ -37,7 +36,7 @@ public class DefaultBottomSheetCallback extends BottomSheetBehavior.BottomSheetC mSheetChangedListener.onSheetDirectionIconChange(); - if (isHalfExpandedState(newState) || isExpandedState(newState)) + if (isExpandedState(newState)) { mSheetChangedListener.onSheetDetailsOpened(); return; diff --git a/android/src/com/mapswithme/maps/widget/placepage/PlacePageGestureListener.java b/android/src/com/mapswithme/maps/widget/placepage/PlacePageGestureListener.java index 6a32a5859c..45e8181dcc 100644 --- a/android/src/com/mapswithme/maps/widget/placepage/PlacePageGestureListener.java +++ b/android/src/com/mapswithme/maps/widget/placepage/PlacePageGestureListener.java @@ -30,11 +30,11 @@ class PlacePageGestureListener extends GestureDetector.SimpleOnGestureListener int state = mBottomSheetBehavior.getState(); if (PlacePageUtils.isCollapsedState(state)) { - mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_HALF_EXPANDED); + mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED); return true; } - if (PlacePageUtils.isHalfExpandedState(state) || PlacePageUtils.isExpandedState(state)) + if (PlacePageUtils.isExpandedState(state)) { mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED); return true; diff --git a/android/src/com/mapswithme/maps/widget/placepage/PlacePageUtils.java b/android/src/com/mapswithme/maps/widget/placepage/PlacePageUtils.java index 92bef8e014..5bb6b1c573 100644 --- a/android/src/com/mapswithme/maps/widget/placepage/PlacePageUtils.java +++ b/android/src/com/mapswithme/maps/widget/placepage/PlacePageUtils.java @@ -79,7 +79,7 @@ class PlacePageUtils int drawableId = UiUtils.NO_ID; if (PlacePageUtils.isCollapsedState(state)) drawableId = R.drawable.ic_disclosure_up; - else if (PlacePageUtils.isHalfExpandedState(state) || PlacePageUtils.isExpandedState(state)) + else if (PlacePageUtils.isExpandedState(state)) drawableId = R.drawable.ic_disclosure_down; if (drawableId == UiUtils.NO_ID) @@ -105,11 +105,6 @@ class PlacePageUtils return state == BottomSheetBehavior.STATE_COLLAPSED; } - static boolean isHalfExpandedState(@BottomSheetBehavior.State int state) - { - return state == BottomSheetBehavior.STATE_HALF_EXPANDED; - } - static boolean isExpandedState(@BottomSheetBehavior.State int state) { return state == BottomSheetBehavior.STATE_EXPANDED; diff --git a/android/src/com/mapswithme/maps/widget/placepage/RichPlacePageController.java b/android/src/com/mapswithme/maps/widget/placepage/RichPlacePageController.java index 2c174cbbeb..9ac036ed53 100644 --- a/android/src/com/mapswithme/maps/widget/placepage/RichPlacePageController.java +++ b/android/src/com/mapswithme/maps/widget/placepage/RichPlacePageController.java @@ -160,7 +160,7 @@ public class RichPlacePageController implements PlacePageController, LocationLis if (object.getOpeningMode() == MapObject.OPENING_MODE_DETAILS) { - mPlacePageBehavior.setState(BottomSheetBehavior.STATE_HALF_EXPANDED); + mPlacePageBehavior.setState(BottomSheetBehavior.STATE_EXPANDED); return; } @@ -175,7 +175,6 @@ public class RichPlacePageController implements PlacePageController, LocationLis mPlacePage.post(() -> { setPeekHeight(); mPlacePageBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED); - setPlacePageAnchor(); }); } @@ -243,11 +242,6 @@ public class RichPlacePageController implements PlacePageController, LocationLis mSlideListener.onPlacePageSlide((int) (mPlacePage.getTop() + mPlacePage.getTranslationY())); } - private void setPlacePageAnchor() - { - mPlacePageBehavior.setHalfExpandedRatio(ANCHOR_RATIO); - } - private int calculatePeekHeight() { final int organicPeekHeight = mPlacePage.getPreviewHeight() + mButtonsLayout.getHeight(); @@ -355,7 +349,6 @@ public class RichPlacePageController implements PlacePageController, LocationLis private void restorePlacePageState(@NonNull MapObject object, @BottomSheetBehavior.State int state) { mPlacePage.post(() -> { - setPlacePageAnchor(); mPlacePageBehavior.setState(state); UiUtils.show(mButtonsLayout); setPeekHeight();