forked from organicmaps/organicmaps
[android] remove unused layout change listener
Signed-off-by: Arnaud Vergnet <arnaud.vergnet@mailo.com>
This commit is contained in:
parent
38af9ddb06
commit
02b0d2a6f7
1 changed files with 2 additions and 22 deletions
|
@ -26,9 +26,7 @@ import com.mapswithme.util.log.Logger;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
|
||||
public class RichPlacePageController implements PlacePageController, LocationListener,
|
||||
View.OnLayoutChangeListener,
|
||||
Closable
|
||||
public class RichPlacePageController implements PlacePageController, LocationListener, Closable
|
||||
{
|
||||
private static final String TAG = RichPlacePageController.class.getSimpleName();
|
||||
|
||||
|
@ -130,7 +128,6 @@ public class RichPlacePageController implements PlacePageController, LocationLis
|
|||
GestureDetectorCompat gestureDetector = new GestureDetectorCompat(activity, ppGestureListener);
|
||||
mPlacePage.addPlacePageGestureListener(ppGestureListener);
|
||||
mPlacePage.setOnTouchListener((v, event) -> gestureDetector.onTouchEvent(event));
|
||||
mPlacePage.addOnLayoutChangeListener(this);
|
||||
mPlacePage.addClosable(this);
|
||||
mPlacePage.setRoutingModeListener(mRoutingModeListener);
|
||||
|
||||
|
@ -244,6 +241,7 @@ public class RichPlacePageController implements PlacePageController, LocationLis
|
|||
mPlacePage.setScrollable(true);
|
||||
mPlacePageBehavior.setDraggable(true);
|
||||
mPlacePageBehavior.setPeekHeight(peekHeight);
|
||||
PlacePageUtils.moveViewportUp(mPlacePage, mViewportMinHeight);
|
||||
}
|
||||
});
|
||||
animator.addUpdateListener(animation -> onUpdateTranslation());
|
||||
|
@ -316,24 +314,6 @@ public class RichPlacePageController implements PlacePageController, LocationLis
|
|||
// Do nothing by default.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int
|
||||
oldTop, int oldRight, int oldBottom)
|
||||
{
|
||||
if (mPlacePageBehavior.getPeekHeight() == 0)
|
||||
{
|
||||
Logger.d(TAG, "Layout change ignored, peek height not calculated yet");
|
||||
return;
|
||||
}
|
||||
|
||||
mPlacePage.post(this::setPeekHeight);
|
||||
|
||||
if (PlacePageUtils.isHiddenState(mPlacePageBehavior.getState()))
|
||||
return;
|
||||
|
||||
PlacePageUtils.moveViewportUp(mPlacePage, mViewportMinHeight);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSave(@NonNull Bundle outState)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue