forked from organicmaps/organicmaps
[android] call onSlideFinish only when bottomsheet is settled
Signed-off-by: Arnaud Vergnet <arnaud.vergnet@mailo.com>
This commit is contained in:
parent
71ef628a9b
commit
a7e205c181
4 changed files with 2 additions and 23 deletions
|
@ -3,7 +3,6 @@ package com.mapswithme.maps.widget.placepage;
|
|||
public interface BottomSheetChangedListener
|
||||
{
|
||||
void onSheetHidden();
|
||||
void onSheetDirectionIconChange();
|
||||
void onSheetDetailsOpened();
|
||||
void onSheetCollapsed();
|
||||
void onSheetSliding(int top);
|
||||
|
|
|
@ -24,9 +24,9 @@ public class DefaultBottomSheetCallback extends BottomSheetBehavior.BottomSheetC
|
|||
{
|
||||
Logger.d(TAG, "State change, new = " + PlacePageUtils.toString(newState));
|
||||
if (PlacePageUtils.isSettlingState(newState) || PlacePageUtils.isDraggingState(newState))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mSheetChangedListener.onSheetSlideFinish();
|
||||
|
||||
if (PlacePageUtils.isHiddenState(newState))
|
||||
{
|
||||
|
@ -34,8 +34,6 @@ public class DefaultBottomSheetCallback extends BottomSheetBehavior.BottomSheetC
|
|||
return;
|
||||
}
|
||||
|
||||
mSheetChangedListener.onSheetDirectionIconChange();
|
||||
|
||||
if (isExpandedState(newState))
|
||||
{
|
||||
mSheetChangedListener.onSheetDetailsOpened();
|
||||
|
@ -49,10 +47,5 @@ public class DefaultBottomSheetCallback extends BottomSheetBehavior.BottomSheetC
|
|||
public void onSlide(@NonNull View bottomSheet, float slideOffset)
|
||||
{
|
||||
mSheetChangedListener.onSheetSliding(bottomSheet.getTop());
|
||||
|
||||
if (slideOffset < 0)
|
||||
return;
|
||||
|
||||
mSheetChangedListener.onSheetSlideFinish();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ import android.location.Location;
|
|||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowInsets;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
@ -53,12 +52,6 @@ public class RichPlacePageController implements PlacePageController, LocationLis
|
|||
onHiddenInternal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSheetDirectionIconChange()
|
||||
{
|
||||
// No op.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSheetDetailsOpened()
|
||||
{
|
||||
|
|
|
@ -52,12 +52,6 @@ public class SimplePlacePageController implements PlacePageController
|
|||
mStateListener.onPlacePageClosed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSheetDirectionIconChange()
|
||||
{
|
||||
// No op.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSheetDetailsOpened()
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue