@Override
 protected Dialog onCreateDialog(int id) {
   switch (id) {
     case DIALOG_MAP_VERSION_UPDATE:
       AlertDialog.Builder builder = new AlertDialog.Builder(this);
       builder.setMessage(R.string.map_version_changed_info);
       builder.setPositiveButton(
           R.string.button_upgrade_osmandplus,
           new DialogInterface.OnClickListener() {
             @Override
             public void onClick(DialogInterface dialog, int which) {
               Intent intent =
                   new Intent(
                       Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:net.osmand.plus"));
               try {
                 startActivity(intent);
               } catch (ActivityNotFoundException e) {
               }
             }
           });
       builder.setNegativeButton(
           R.string.default_buttons_cancel,
           new DialogInterface.OnClickListener() {
             @Override
             public void onClick(DialogInterface dialog, int which) {
               removeDialog(DIALOG_MAP_VERSION_UPDATE);
             }
           });
       return builder.create();
     case DIALOG_PROGRESS_LIST:
       ProgressDialog dialog = new ProgressDialog(this);
       dialog.setTitle(R.string.downloading);
       dialog.setMessage(getString(R.string.downloading_list_indexes));
       dialog.setCancelable(true);
       return dialog;
     case DIALOG_PROGRESS_FILE:
       ProgressDialogImplementation progress =
           ProgressDialogImplementation.createProgressDialog(
               DownloadIndexActivity.this,
               getString(R.string.downloading),
               getString(R.string.downloading_file),
               ProgressDialog.STYLE_HORIZONTAL,
               new DialogInterface.OnCancelListener() {
                 @Override
                 public void onCancel(DialogInterface dialog) {
                   makeSureUserCancelDownload(dialog);
                 }
               });
       progressFileDlg = progress.getDialog();
       progressFileDlg.setOnDismissListener(
           new DialogInterface.OnDismissListener() {
             @Override
             public void onDismiss(DialogInterface dialog) {
               downloadFileHelper.setInterruptDownloading(true);
             }
           });
       return progress.getDialog();
   }
   return null;
 }
 @Override
 protected Dialog onCreateDialog(int id) {
   switch (id) {
     case DIALOG_PROGRESS_UPLOAD:
       return ProgressDialogImplementation.createProgressDialog(
               LocalOpenstreetmapActivity.this,
               getString(R.string.uploading),
               getString(R.string.local_openstreetmap_uploading),
               ProgressDialog.STYLE_HORIZONTAL)
           .getDialog();
   }
   return null;
 }