From 70f68e06e740f0690a46300b0e5ad0e961fe8303 Mon Sep 17 00:00:00 2001 From: Roman Romanov Date: Mon, 19 Dec 2016 13:10:18 +0400 Subject: [PATCH] [android] Added onResume method to NavigationButtonsAnimationController. --- android/src/com/mapswithme/maps/MwmActivity.java | 2 ++ .../maps/NavigationButtonsAnimationController.java | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/android/src/com/mapswithme/maps/MwmActivity.java b/android/src/com/mapswithme/maps/MwmActivity.java index 2cf749302a..7339db6942 100644 --- a/android/src/com/mapswithme/maps/MwmActivity.java +++ b/android/src/com/mapswithme/maps/MwmActivity.java @@ -867,6 +867,8 @@ public class MwmActivity extends BaseMwmFragmentActivity mOnmapDownloader.onResume(); if (mNavigationController != null) mNavigationController.onResume(); + if(mNavAnimationController != null) + mNavAnimationController.onResume(); } @Override diff --git a/android/src/com/mapswithme/maps/NavigationButtonsAnimationController.java b/android/src/com/mapswithme/maps/NavigationButtonsAnimationController.java index 635d2032c4..51c54058e8 100644 --- a/android/src/com/mapswithme/maps/NavigationButtonsAnimationController.java +++ b/android/src/com/mapswithme/maps/NavigationButtonsAnimationController.java @@ -30,11 +30,16 @@ class NavigationButtonsAnimationController { mZoomIn = zoomIn; mZoomOut = zoomOut; - UiUtils.showIf(showZoomButtons(), mZoomIn, mZoomOut); + checkZoomButtonsVisibility(); mMyPosition = myPosition; calculateBottomLimit(); } + private void checkZoomButtonsVisibility() + { + UiUtils.showIf(showZoomButtons(), mZoomIn, mZoomOut); + } + void disappearZoomButtons() { if (!showZoomButtons()) @@ -253,4 +258,9 @@ class NavigationButtonsAnimationController { return Config.showZoomButtons(); } + + public void onResume() + { + checkZoomButtonsVisibility(); + } }