Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralexzatsepin <az@mapswithme.com>2016-12-09 11:56:00 +0300
committeralexzatsepin <az@mapswithme.com>2016-12-09 11:56:00 +0300
commit07bb4dd047b82aaab93d0da86d61a0c9cc9859a2 (patch)
tree2e3827a81c7176a273f49d04409239356e8aa603 /android
parent8cb3c040f4dc4066846082b2c2d7c71fa2f227eb (diff)
[android] Fixed the wrong calculation of nav buttons position in edge cases
Diffstat (limited to 'android')
-rw-r--r--android/src/com/mapswithme/maps/NavigationButtonsAnimationController.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/android/src/com/mapswithme/maps/NavigationButtonsAnimationController.java b/android/src/com/mapswithme/maps/NavigationButtonsAnimationController.java
index 116ccbe2f5..32aaea2187 100644
--- a/android/src/com/mapswithme/maps/NavigationButtonsAnimationController.java
+++ b/android/src/com/mapswithme/maps/NavigationButtonsAnimationController.java
@@ -53,13 +53,13 @@ class NavigationButtonsAnimationController
Animations.appearSliding(mZoomIn, Animations.RIGHT, null);
Animations.appearSliding(mZoomOut, Animations.RIGHT, null);
- updateZoomButtonsPosition(mTopLimit);
+ updateZoomButtonsPosition();
}
void setTopLimit(float limit)
{
mTopLimit = limit;
- updateZoomButtonsPosition(limit);
+ updateZoomButtonsPosition();
}
void onPlacePageVisibilityChanged(boolean isVisible)
@@ -93,15 +93,15 @@ class NavigationButtonsAnimationController
});
}
- private void updateZoomButtonsPosition(float newTop)
+ private void updateZoomButtonsPosition()
{
// It means that the zoom buttons fit in screen perfectly,
// any updates of position are no needed.
- if (mZoomIn.getTop() >= mTopLimit)
+ if (mZoomIn.getTop() >= mTopLimit && UiUtils.isVisible(mZoomIn))
return;
// If the top limit is decreased we try to return zoom buttons at initial position.
- if (newTop < mTopLimit && tryPlaceZoomButtonsAtInitialPosition())
+ if (mTopLimit < mZoomIn.getTop() && tryPlaceZoomButtonsAtInitialPosition())
{
LOGGER.d("Zoom buttons were come back to initial position");
return;