forked from organicmaps/organicmaps
[android] Fixed review notes
https://github.com/mapsme/omim/pull/10273#discussion_r252117697 https://github.com/mapsme/omim/pull/10273#discussion_r252117832 https://github.com/mapsme/omim/pull/10273#discussion_r252116996 https://github.com/mapsme/omim/pull/10273#discussion_r252117215
This commit is contained in:
parent
600bfd78f5
commit
a86c993a43
2 changed files with 6 additions and 23 deletions
|
@ -11,12 +11,10 @@ import com.mapswithme.maps.dialog.ProgressDialogFragment;
|
|||
public abstract class BaseAsyncOperationFragment extends BaseMwmFragment
|
||||
{
|
||||
private static final String PROGRESS_DIALOG_TAG = "base_progress_dialog";
|
||||
public static final String TITLE = "title";
|
||||
|
||||
protected void showProgress()
|
||||
{
|
||||
Bundle arguments = getArguments();
|
||||
int resId = arguments.getInt(TITLE, getProgressDialogTitle());
|
||||
int resId = getProgressDialogTitle();
|
||||
String title = getString(resId);
|
||||
ProgressDialogFragment dialog = ProgressDialogFragment.newInstance(title);
|
||||
getFragmentManager()
|
||||
|
|
|
@ -3,7 +3,6 @@ package com.mapswithme.maps.ugc.routes;
|
|||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.support.v4.app.ShareCompat;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
@ -108,31 +107,17 @@ public class SendLinkPlaceholderFragment extends NoToolbarBaseMwmAuthFragment im
|
|||
}
|
||||
|
||||
private void onUploadFailed()
|
||||
{
|
||||
showErrorDialog();
|
||||
}
|
||||
|
||||
private void showErrorDialog()
|
||||
{
|
||||
/* FIXME text*/
|
||||
showErrorDialog(R.string.unable_upload_error_subtitle_edited,
|
||||
R.string.unable_upload_error_subtitle_edited,
|
||||
REQ_CODE_ERROR_EDITED_ON_WEB_DIALOG,
|
||||
ERROR_EDITED_ON_WEB_DIALOG_REQ_TAG);
|
||||
}
|
||||
|
||||
private void showErrorDialog(@StringRes int title, @StringRes int subtitle, int reqCode,
|
||||
@NonNull String tag)
|
||||
{
|
||||
AlertDialog dialog = new AlertDialog.Builder()
|
||||
.setTitleId(title)
|
||||
.setMessageId(subtitle)
|
||||
.setTitleId(R.string.unable_upload_error_subtitle_edited)
|
||||
.setMessageId(R.string.unable_upload_error_subtitle_edited)
|
||||
.setPositiveBtnId(R.string.ok)
|
||||
.setReqCode(reqCode)
|
||||
.setReqCode(REQ_CODE_ERROR_EDITED_ON_WEB_DIALOG)
|
||||
.setFragManagerStrategyType(AlertDialog.FragManagerStrategyType.ACTIVITY_FRAGMENT_MANAGER)
|
||||
.build();
|
||||
dialog.setTargetFragment(this, reqCode);
|
||||
dialog.show(this, tag);
|
||||
dialog.setTargetFragment(this, REQ_CODE_ERROR_EDITED_ON_WEB_DIALOG);
|
||||
dialog.show(this, ERROR_EDITED_ON_WEB_DIALOG_REQ_TAG);
|
||||
}
|
||||
|
||||
private void onUploadSucceeded()
|
||||
|
|
Loading…
Add table
Reference in a new issue