From ef0e9ecd49e90e7bbd52d7eb81720e6e7734139c Mon Sep 17 00:00:00 2001 From: Bars107 Date: Sat, 11 Apr 2015 15:51:46 +0300 Subject: [PATCH] Updated first time card --- OsmAnd/res/layout/dash_first_time.xml | 9 +++++++-- OsmAnd/res/values/colors.xml | 1 + OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java | 6 ++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/OsmAnd/res/layout/dash_first_time.xml b/OsmAnd/res/layout/dash_first_time.xml index c76889b3bf..03d61ca1ec 100644 --- a/OsmAnd/res/layout/dash_first_time.xml +++ b/OsmAnd/res/layout/dash_first_time.xml @@ -10,7 +10,7 @@ + android:text="@string/welcome_select_region" + android:textSize="@dimen/download_descr_text_size"/> diff --git a/OsmAnd/res/values/colors.xml b/OsmAnd/res/values/colors.xml index 8948fc5f1f..7ab241e669 100644 --- a/OsmAnd/res/values/colors.xml +++ b/OsmAnd/res/values/colors.xml @@ -1,6 +1,7 @@ + #ff8f00 #33B4E4 #536DFE diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java index 8ebc6959a2..2aa39c131c 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java @@ -101,7 +101,8 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks { private int mFlexibleSpaceImageHeight; private int mFlexibleBlurSpaceHeight; private boolean portrait; - + + int baseColor; private WaypointDialogHelper waypointDialogHelper; private final int[] running = new int[] { -1 }; @@ -125,6 +126,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks { public void createDashboardView() { + baseColor = mapActivity.getResources().getColor(R.color.osmand_orange); waypointDialogHelper = new WaypointDialogHelper(mapActivity); landscape = !ScreenOrientationHelper.isOrientationPortrait(mapActivity); dashboardView = (FrameLayout) mapActivity.findViewById(R.id.dashboard); @@ -807,7 +809,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks { float sh = mFlexibleSpaceImageHeight - mFlexibleBlurSpaceHeight; float t = sh == 0 ? 1 : (1 - Math.max(0, -scrollY + sh) / sh); t = Math.max(0, t); - int baseColor = 0xff8f00; + int alpha = (int) (t * 255); // in order to have proper fast scroll down int malpha = t == 1 ? alpha = 0 : alpha;