From ba50524e4d85dcc4360c1d430fa59ee075df6a94 Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Tue, 29 Aug 2017 18:08:57 +0300 Subject: [PATCH 1/3] Disable animation when zooming and in context menu --- .../mapcontextmenu/MapContextMenuFragment.java | 14 +++++++++----- .../other/MapMultiSelectionMenuFragment.java | 9 +++++++-- .../plus/views/AnimateDraggingMapThread.java | 3 ++- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java index e34dea0ef1..537f017118 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java @@ -1251,12 +1251,16 @@ public class MapContextMenuFragment extends Fragment implements DownloadEvents { return false; } - int slideInAnim = R.anim.slide_in_bottom; - int slideOutAnim = R.anim.slide_out_bottom; + int slideInAnim = 0; + int slideOutAnim = 0; + if (!mapActivity.getMyApplication().getSettings().DO_NOT_USE_ANIMATIONS.get()) { + slideInAnim = R.anim.slide_in_bottom; + slideOutAnim = R.anim.slide_out_bottom; - if (menu.isExtended()) { - slideInAnim = menu.getSlideInAnimation(); - slideOutAnim = menu.getSlideOutAnimation(); + if (menu.isExtended()) { + slideInAnim = menu.getSlideInAnimation(); + slideOutAnim = menu.getSlideOutAnimation(); + } } MapContextMenuFragment fragment = new MapContextMenuFragment(); diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java index 36be5a5ffe..9a77d5f849 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java @@ -114,8 +114,13 @@ public class MapMultiSelectionMenuFragment extends Fragment implements AdapterVi MapMultiSelectionMenu menu = mapActivity.getContextMenu().getMultiSelectionMenu(); - int slideInAnim = menu.getSlideInAnimation(); - int slideOutAnim = menu.getSlideOutAnimation(); + int slideInAnim = 0; + int slideOutAnim = 0; + + if (!mapActivity.getMyApplication().getSettings().DO_NOT_USE_ANIMATIONS.get()) { + slideInAnim = menu.getSlideInAnimation(); + slideOutAnim = menu.getSlideOutAnimation(); + } MapMultiSelectionMenuFragment fragment = new MapMultiSelectionMenuFragment(); menu.getMapActivity().getSupportFragmentManager().beginTransaction() diff --git a/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java b/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java index 0c72a8980d..0d796093cb 100644 --- a/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java +++ b/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java @@ -345,7 +345,8 @@ public class AnimateDraggingMapThread { } public void startZooming(final int zoomEnd, final double zoomPart, final boolean notifyListener){ - final float animationTime = ZOOM_ANIMATION_TIME; + boolean doNotUseAnimations = tileView.getSettings().DO_NOT_USE_ANIMATIONS.get(); + final float animationTime = doNotUseAnimations ? 0 : ZOOM_ANIMATION_TIME; startThreadAnimating(new Runnable(){ @Override public void run() { From 814555512008613b408e8c3d64ddd447d9f6057e Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Wed, 30 Aug 2017 10:12:25 +0300 Subject: [PATCH 2/3] Fix #4321 --- OsmAnd/src/net/osmand/plus/activities/MapActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index e07721d14b..1d0f79320b 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -1312,7 +1312,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven Intent intent = getIntent(); if (intent != null && intent.getData() != null) { Uri data = intent.getData(); - if ("http".equalsIgnoreCase(data.getScheme()) && data.getHost() != null && data.getHost().contains("osmand.net") && + if (("http".equalsIgnoreCase(data.getScheme()) || "https".equalsIgnoreCase(data.getScheme()))&& data.getHost() != null && data.getHost().contains("osmand.net") && data.getPath() != null && data.getPath().startsWith("/go")) { String lat = data.getQueryParameter("lat"); String lon = data.getQueryParameter("lon"); From 3d9c6d0d8198013225ea7478c5a97668653b032a Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Wed, 30 Aug 2017 11:10:42 +0300 Subject: [PATCH 3/3] Fix #4269 --- .../src/net/osmand/plus/helpers/WaypointDialogHelper.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java index 8ebf1dfb87..b336819d22 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java @@ -761,6 +761,13 @@ public class WaypointDialogHelper { public void dismiss() { if (app.getPoiFilters().isShowingAnyPoi()) { enableType(running, listAdapter, type, enable); + } else { + running[0] = -1; + if (helperCallbacks != null) { + helperCallbacks.reloadAdapter(); + } else { + reloadListAdapter(listAdapter); + } } } });