diff --git a/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java b/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java index d7ffea8939..4f00b88922 100644 --- a/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java @@ -273,7 +273,7 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity { } if(count > 0){ Builder builder = new AlertDialog.Builder(this); - builder.setMessage(MessageFormat.format(getString(R.string.download_additional_maps), s, sz)); + builder.setMessage(getString(R.string.download_additional_maps, s, sz)); builder.setPositiveButton(R.string.default_buttons_yes, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { diff --git a/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java b/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java index 9a1d60caf1..79237920d8 100644 --- a/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java +++ b/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java @@ -65,6 +65,7 @@ public class TourViewActivity extends SherlockFragmentActivity { private ListView mDrawerList; private ArrayAdapter drawerAdapter; private WeakHashMap fragments = new WeakHashMap(); + private boolean restartAfterDownload; private static Object selectedItem; @Override @@ -219,6 +220,10 @@ public class TourViewActivity extends SherlockFragmentActivity { @Override protected void onResume() { super.onResume(); + if(restartAfterDownload){ + restartAfterDownload = false; + selectMenu(selectedItem == null ? R.string.sherpafy_tours : selectedItem); + } } public MenuItem createMenuItem(Menu m, int id, int titleRes, int iconLight, int iconDark, int menuItemType, @@ -373,6 +378,7 @@ public class TourViewActivity extends SherlockFragmentActivity { final Intent download = new Intent(this, DownloadIndexActivity.class); download.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); startActivity(download); + restartAfterDownload = true; } public void goToMap(LatLon location) {