diff --git a/OsmAnd/res/layout-land/map_progress_top.xml b/OsmAnd/res/layout-land/map_progress_top.xml
new file mode 100644
index 0000000000..8ef2d609c0
--- /dev/null
+++ b/OsmAnd/res/layout-land/map_progress_top.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/main.xml b/OsmAnd/res/layout/main.xml
index 8dcfe6554b..5481c190b6 100644
--- a/OsmAnd/res/layout/main.xml
+++ b/OsmAnd/res/layout/main.xml
@@ -49,6 +49,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
index 014085092c..eb9f77b110 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
@@ -333,17 +333,29 @@ public class MapActivity extends AccessibleActivity implements DownloadEvents,
private void createProgressBarForRouting() {
final ProgressBar pb = (ProgressBar) findViewById(R.id.map_horizontal_progress);
+ final View pbExtView = findViewById(R.id.progress_layout_external);
+ final ProgressBar pbExt = (ProgressBar) findViewById(R.id.map_horizontal_progress_external);
+
app.getRoutingHelper().setProgressBar(new RouteCalculationProgressCallback() {
@Override
public void updateProgress(int progress) {
- pb.setVisibility(View.VISIBLE);
- pb.setProgress(progress);
- pb.requestLayout();
+ if (findViewById(R.id.MapHudButtonsOverlay).getVisibility() == View.VISIBLE) {
+ pbExtView.setVisibility(View.GONE);
+ pb.setVisibility(View.VISIBLE);
+ pb.setProgress(progress);
+ pb.requestLayout();
+ } else {
+ pb.setVisibility(View.GONE);
+ pbExtView.setVisibility(View.VISIBLE);
+ pbExt.setProgress(progress);
+ pbExt.requestLayout();
+ }
}
@Override
public void finish() {
+ pbExtView.setVisibility(View.GONE);
pb.setVisibility(View.GONE);
}
});
diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java
index 4a911c3ee0..44c97c6277 100644
--- a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java
+++ b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java
@@ -620,6 +620,12 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
}
mapActivity.findViewById(R.id.toolbar_back).setVisibility(isBackButtonVisible() ? View.VISIBLE : View.GONE);
mapActivity.findViewById(R.id.MapHudButtonsOverlay).setVisibility(View.INVISIBLE);
+ boolean portrait = AndroidUiHelper.isOrientationPortrait(mapActivity);
+ if (!portrait) {
+ AndroidUiHelper.updateVisibility(mapActivity.findViewById(R.id.map_route_land_left_margin_external), true);
+ mapActivity.getMapView().setMapPositionX(1);
+ mapActivity.refreshMap();
+ }
updateToolbarActions();
//fabButton.showFloatingActionButton();
@@ -634,6 +640,13 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
mapActivity.getRoutingHelper().removeListener(this);
mapActivity.getMapViewTrackingUtilities().setDashboard(null);
hide(dashboardView.findViewById(R.id.animateContent), animation);
+
+ if (!mapActivity.getMapLayers().getMapControlsLayer().getMapRouteInfoMenu().isVisible()) {
+ AndroidUiHelper.updateVisibility(mapActivity.findViewById(R.id.map_route_land_left_margin_external), false);
+ mapActivity.getMapView().setMapPositionX(0);
+ mapActivity.getMapView().refreshMap();
+ }
+
mapActivity.findViewById(R.id.MapHudButtonsOverlay).setVisibility(View.VISIBLE);
hideActionButton();
for (WeakReference df : fragList) {