diff --git a/OsmAnd/res/drawable/btn_circle.xml b/OsmAnd/res/drawable/btn_circle.xml
new file mode 100644
index 0000000000..2090295c75
--- /dev/null
+++ b/OsmAnd/res/drawable/btn_circle.xml
@@ -0,0 +1,13 @@
+
+
+
+ -
+
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_circle_transparent.xml b/OsmAnd/res/drawable/btn_circle_transparent.xml
new file mode 100644
index 0000000000..7fccfc9f24
--- /dev/null
+++ b/OsmAnd/res/drawable/btn_circle_transparent.xml
@@ -0,0 +1,9 @@
+
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_flat.xml b/OsmAnd/res/drawable/btn_flat.xml
new file mode 100644
index 0000000000..fa17c040e5
--- /dev/null
+++ b/OsmAnd/res/drawable/btn_flat.xml
@@ -0,0 +1,14 @@
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_inset_circle.xml b/OsmAnd/res/drawable/btn_inset_circle.xml
new file mode 100644
index 0000000000..d08b764287
--- /dev/null
+++ b/OsmAnd/res/drawable/btn_inset_circle.xml
@@ -0,0 +1,16 @@
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_left_round.xml b/OsmAnd/res/drawable/btn_left_round.xml
new file mode 100644
index 0000000000..be66a3477f
--- /dev/null
+++ b/OsmAnd/res/drawable/btn_left_round.xml
@@ -0,0 +1,15 @@
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_right_round.xml b/OsmAnd/res/drawable/btn_right_round.xml
new file mode 100644
index 0000000000..843840c380
--- /dev/null
+++ b/OsmAnd/res/drawable/btn_right_round.xml
@@ -0,0 +1,18 @@
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_round.xml b/OsmAnd/res/drawable/btn_round.xml
new file mode 100644
index 0000000000..6b2158c0b7
--- /dev/null
+++ b/OsmAnd/res/drawable/btn_round.xml
@@ -0,0 +1,15 @@
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/roundedbutton.xml b/OsmAnd/res/drawable/roundedbutton.xml
deleted file mode 100644
index 326556d040..0000000000
--- a/OsmAnd/res/drawable/roundedbutton.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- -
-
-
- -
-
-
-
-
\ No newline at end of file
diff --git a/OsmAnd/res/layout-land/dashboard_over_map.xml b/OsmAnd/res/layout-land/dashboard_over_map.xml
index 22329472c6..70ebe50980 100644
--- a/OsmAnd/res/layout-land/dashboard_over_map.xml
+++ b/OsmAnd/res/layout-land/dashboard_over_map.xml
@@ -48,7 +48,7 @@
diff --git a/OsmAnd/res/layout/main.xml b/OsmAnd/res/layout/main.xml
index 73eaf225bb..cd90ad0af8 100644
--- a/OsmAnd/res/layout/main.xml
+++ b/OsmAnd/res/layout/main.xml
@@ -1,64 +1,81 @@
-
+
-
+
-
+
-
+
-
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/map_hud_bottom.xml b/OsmAnd/res/layout/map_hud_bottom.xml
new file mode 100644
index 0000000000..f51ef81fbc
--- /dev/null
+++ b/OsmAnd/res/layout/map_hud_bottom.xml
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/map_hud_top.xml b/OsmAnd/res/layout/map_hud_top.xml
new file mode 100644
index 0000000000..44b6e44c68
--- /dev/null
+++ b/OsmAnd/res/layout/map_hud_top.xml
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/map_hud_widget.xml b/OsmAnd/res/layout/map_hud_widget.xml
new file mode 100644
index 0000000000..143aeeff4b
--- /dev/null
+++ b/OsmAnd/res/layout/map_hud_widget.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/map_view_on_dashboard.xml b/OsmAnd/res/layout/map_view_on_dashboard.xml
index bf041c1e3e..34bca26f36 100644
--- a/OsmAnd/res/layout/map_view_on_dashboard.xml
+++ b/OsmAnd/res/layout/map_view_on_dashboard.xml
@@ -10,7 +10,7 @@
android:layout_gravity="top|left"
android:layout_marginLeft="@dimen/map_button_margin"
android:layout_marginTop="@dimen/map_button_margin"
- android:background="@drawable/roundedbutton"
+ android:background="@drawable/btn_inset_circle"
android:src="@drawable/ic_action_layers_light" />
\ No newline at end of file
diff --git a/OsmAnd/res/values/colors.xml b/OsmAnd/res/values/colors.xml
index d4661f41de..84b8136b02 100644
--- a/OsmAnd/res/values/colors.xml
+++ b/OsmAnd/res/values/colors.xml
@@ -9,6 +9,10 @@
#8cd0d0d0
#333b40
#be39464d
+
+ #333333
+ #eeffffff
+ #ddcccccc
#39464d
diff --git a/OsmAnd/res/values/sizes.xml b/OsmAnd/res/values/sizes.xml
index 8c9efe0702..4a3aa3edc3 100644
--- a/OsmAnd/res/values/sizes.xml
+++ b/OsmAnd/res/values/sizes.xml
@@ -47,8 +47,18 @@
90dp
16dp
48dp
- 40dp
- 8dp
+
+ 40dp
+ 48dp
+ 24dp
+ 32dp
+ 80dp
+ 20dp
+ 4dp
+ 4dp
+ 3dp
+ 1px
+
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
index 7e06d9f8e0..56896d6c13 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
@@ -176,7 +176,7 @@ public class MapActivity extends AccessibleActivity {
}
mapView.refreshMap(true);
findViewById(R.id.init_progress).setVisibility(View.GONE);
- findViewById(R.id.ParentLayout).invalidate();
+ findViewById(R.id.drawer_layout).invalidate();
}
};
getMyApplication().checkApplicationIsBeingInitialized(this, initListener);
diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java
index 42cc7353df..7790e3c47c 100644
--- a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java
+++ b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java
@@ -75,9 +75,11 @@ public class DashboardOnMap {
public void createDashboardView() {
landscape = !ScreenOrientationHelper.isOrientationPortrait(mapActivity);
- dashboardView = (FrameLayout) mapActivity.getLayoutInflater().inflate(R.layout.dashboard_over_map, null, false);
- dashboardView.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
- ViewGroup.LayoutParams.MATCH_PARENT));
+// dashboardView = (FrameLayout) mapActivity.getLayoutInflater().inflate(R.layout.dashboard_over_map, null, false);
+// dashboardView.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
+// ViewGroup.LayoutParams.MATCH_PARENT));
+// ((FrameLayout) mapActivity.findViewById(R.id.MapHudButtonsOverlay)).addView(dashboardView);
+ dashboardView = (FrameLayout) mapActivity.findViewById(R.id.dashboard);
View.OnClickListener listener = new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -86,7 +88,7 @@ public class DashboardOnMap {
};
dashboardView.findViewById(R.id.animateContent).setOnClickListener(listener);
dashboardView.setOnClickListener(listener);
- ((FrameLayout) mapActivity.findViewById(R.id.ParentLayout)).addView(dashboardView);
+
dashboardView.findViewById(R.id.map_layers_button).setOnClickListener(new View.OnClickListener() {
@@ -103,7 +105,7 @@ public class DashboardOnMap {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
fabButton = new FloatingActionButton.Builder(mapActivity)
- .withDrawable(mapActivity.getResources().getDrawable(R.drawable.ic_action_map))
+ .withDrawable(mapActivity.getResources().getDrawable(R.drawable.ic_action_get_my_location))
.withButtonColor(mapActivity.getResources().getColor(R.color.color_myloc_distance))
.withGravity(landscape ? Gravity.BOTTOM | Gravity.RIGHT : Gravity.TOP | Gravity.RIGHT)
.withMargins(0, landscape ? 0 : 160, 16, landscape ? 16 : 0).create();
@@ -294,7 +296,7 @@ public class DashboardOnMap {
// To animate view slide out from right to left
private void open(View view){
- TranslateAnimation animate = new TranslateAnimation(-mapActivity.findViewById(R.id.ParentLayout).getWidth(),0,0,0);
+ TranslateAnimation animate = new TranslateAnimation(-mapActivity.findViewById(R.id.MapHudButtonsOverlay).getWidth(),0,0,0);
animate.setDuration(500);
animate.setFillAfter(true);
view.startAnimation(animate);
@@ -302,7 +304,7 @@ public class DashboardOnMap {
}
private void hide(View view) {
- TranslateAnimation animate = new TranslateAnimation(0, -mapActivity.findViewById(R.id.ParentLayout).getWidth(), 0, 0);
+ TranslateAnimation animate = new TranslateAnimation(0, -mapActivity.findViewById(R.id.MapHudButtonsOverlay).getWidth(), 0, 0);
animate.setDuration(500);
animate.setFillAfter(true);
animate.setAnimationListener(new AnimationListener() {
diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java
index 9a35874911..81fc5d1315 100644
--- a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java
+++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java
@@ -71,7 +71,7 @@ public class WaypointDialogHelper implements OsmAndLocationListener {
this.app = mapActivity.getMyApplication();
waypointHelper = this.app.getWaypointHelper();
this.mapActivity = mapActivity;
- this.mainLayout = (LinearLayout) mapActivity.findViewById(R.id.dialog_layout);
+ this.mainLayout = (LinearLayout) mapActivity.findViewById(R.id.WaypointVisit);
}
diff --git a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java
index b6538e49ed..fed0404d55 100644
--- a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java
@@ -1,6 +1,7 @@
package net.osmand.plus.views;
import java.util.ArrayList;
+import java.util.Calendar;
import java.util.List;
import android.content.pm.ActivityInfo;
@@ -88,6 +89,8 @@ public class MapControlsLayer extends OsmandMapLayer {
int rightCenterGravity = Gravity.RIGHT | Gravity.CENTER;
int leftCenterGravity = Gravity.LEFT | Gravity.CENTER;
+
+ initNewControls();
// default buttons
zoomControls = init(new MapZoomControls(mapActivity, showUIHandler, scaleCoefficient), parent,
rightGravity);
@@ -117,14 +120,50 @@ public class MapControlsLayer extends OsmandMapLayer {
rulerControl = init(new RulerControl(zoomControls, mapActivity, showUIHandler, scaleCoefficient), parent,
rightGravity);
+ initTransparencyBar(view, parent);
+
mapRoutePlanControl.setMargin(mapMenuControls.getWidth());
mapCancelNavigationControl.setMargin(mapSmallMenuControls.getWidth());
mapInfoNavigationControl.setMargin(mapSmallMenuControls.getWidth() + mapCancelNavigationControl.getWidth());
mapAppModeControl.setMargin(mapNavigationControl.getWidth());
- initTransparencyBar(view, parent);
+ ;
}
+ private void initNewControls() {
+ initZooms();
+
+ }
+
+
+ private void initZooms() {
+ final OsmandMapTileView view = mapActivity.getMapView();
+ mapActivity.findViewById(id)
+ zoomInButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ notifyClicked();
+ if (view.isZooming()) {
+ mapActivity.changeZoom(2, System.currentTimeMillis());
+ } else {
+ mapActivity.changeZoom(1, System.currentTimeMillis());
+ }
+
+ }
+ });
+ final View.OnLongClickListener listener = MapZoomControls.getOnClickMagnifierListener(view);
+ zoomInButton.setOnLongClickListener(listener);
+ zoomOutButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ notifyClicked();
+ mapActivity.changeZoom(-1, System.currentTimeMillis());
+ }
+ });
+ zoomOutButton.setOnLongClickListener(listener);
+ }
+
+
public void startNavigation() {
if (mapNavigationControl == null) {
return;
@@ -148,6 +187,10 @@ public class MapControlsLayer extends OsmandMapLayer {
}
protected void notifyClicked(MapControls m) {
+ notifyClicked();
+ }
+
+ protected void notifyClicked() {
if(mapNavigationControl != null) {
mapNavigationControl.stopCounter();
}