Small updates

This commit is contained in:
Victor Shcherb 2014-08-13 19:05:19 +02:00
parent 963ac6229e
commit 3d8547104c
2 changed files with 7 additions and 1 deletions

View file

@ -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) {

View file

@ -65,6 +65,7 @@ public class TourViewActivity extends SherlockFragmentActivity {
private ListView mDrawerList;
private ArrayAdapter<Object> drawerAdapter;
private WeakHashMap<Object, Fragment> fragments = new WeakHashMap<Object, Fragment>();
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) {