From 0102d614e8d10941f45efe9c009f4811b3ec37eb Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Tue, 17 Nov 2015 15:52:59 +0200 Subject: [PATCH] Fixes #1887 and fixes #1804 --- .../src/net/osmand/plus/dashboard/DashboardOnMap.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java index 3f07f54dbe..8520139ffe 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java @@ -122,7 +122,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks { private WaypointDialogHelper waypointDialogHelper; private final int[] running = new int[]{-1}; - private List deletedPoints = new ArrayList(); + private List deletedPoints = new ArrayList<>(); private Drawable gradientToolbar; public DashFragmentData[] getFragmentsData() { @@ -504,7 +504,8 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks { } public void refreshContent(boolean force) { - if (visibleType == DashboardType.WAYPOINTS || visibleType == DashboardType.WAYPOINTS_EDIT || force) { + if (visibleType == DashboardType.WAYPOINTS || visibleType == DashboardType.WAYPOINTS_EDIT + || visibleType == DashboardType.CONFIGURE_MAP || force) { updateListAdapter(); } else { listAdapter.notifyDataSetChanged(); @@ -792,7 +793,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks { int alpha = (int) (t * 255); // in order to have proper fast scroll down - int malpha = t == 1 ? alpha = 0 : alpha; + int malpha = t == 1 ? 0 : alpha; setAlpha(paddingView, malpha, baseColor); setAlpha(dashboardView.findViewById(R.id.map_part_dashboard), malpha, baseColor); gradientToolbar.setAlpha((int) ((1 - t) * 255)); @@ -843,7 +844,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks { // if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { // v.setAlpha(alpha/255.f); // } else { - int colr = (((int) alpha) << 24) | clr; + int colr = (alpha << 24) | clr; v.setBackgroundColor(colr); // } } @@ -872,6 +873,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks { for (WeakReference f : fragList) { DashBaseFragment b = f.get(); if (b != null && !b.isDetached() && class1.isInstance(b)) { + //noinspection unchecked return (T) b; } }