From 0be80bf1d68c4817a46460c5d7738406368aa6d9 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Tue, 25 Jul 2017 15:53:36 +0300 Subject: [PATCH] Fix close banner button --- .../views/mapwidgets/MapInfoWidgetsFactory.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java index 5e46bda6b9..9109cab768 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java @@ -580,14 +580,18 @@ public class MapInfoWidgetsFactory { titleView.setSingleLine(false); } - if (controller.closeBtnVisible && closeButton.getVisibility() == View.GONE) { - closeButton.setVisibility(View.VISIBLE); - } else { + if (controller.closeBtnVisible) { + if (closeButton.getVisibility() == View.GONE) { + closeButton.setVisibility(View.VISIBLE); + } + } else if (closeButton.getVisibility() == View.VISIBLE) { closeButton.setVisibility(View.GONE); } - if (controller.refreshBtnVisible && refreshButton.getVisibility() == View.GONE) { - refreshButton.setVisibility(View.VISIBLE); - } else { + if (controller.refreshBtnVisible) { + if (refreshButton.getVisibility() == View.GONE) { + refreshButton.setVisibility(View.VISIBLE); + } + } else if (refreshButton.getVisibility() == View.VISIBLE) { refreshButton.setVisibility(View.GONE); } }