@@ -0,0 +1,2195 @@
+package jp.fkmsoft.libs.progress;%0A%0Aimport android.app.Activity;%0Aimport android.app.Dialog;%0Aimport android.app.ProgressDialog;%0Aimport android.content.DialogInterface;%0Aimport android.content.Intent;%0Aimport android.os.Bundle;%0Aimport android.support.annotation.NonNull;%0Aimport android.support.v4.app.DialogFragment;%0Aimport android.support.v4.app.Fragment;%0A%0A/**%0A * Dialog fragment for displaying Progress%0A */%0Apublic class ProgressDialogFragment extends DialogFragment %7B%0A    private static final String ARGS_TITLE = %22title%22;%0A    private static final String ARGS_MESSAGE = %22message%22;%0A    private static final String ARGS_EXTRA = %22extra%22;%0A%0A    public static final String EXTRA_DATA = %22extra%22;%0A%0A    public static ProgressDialogFragment newInstance(Fragment target, int requestCode,%0A                                                     String title, String message, Bundle extra) %7B%0A        ProgressDialogFragment fragment = new ProgressDialogFragment();%0A        fragment.setTargetFragment(target, requestCode);%0A        %0A        Bundle args = new Bundle();%0A        args.putString(ARGS_TITLE, title);%0A        args.putString(ARGS_MESSAGE, message);%0A        args.putBundle(ARGS_EXTRA, extra);%0A        fragment.setArguments(args);%0A        %0A        return fragment;%0A    %7D%0A%0A    @NonNull%0A    @Override%0A    public Dialog onCreateDialog(Bundle savedInstanceState) %7B%0A        Activity activity = getActivity();%0A        if (activity == null) %7B return null; %7D%0A%0A        Bundle args = getArguments();%0A        String title = args.getString(ARGS_TITLE);%0A        String message = args.getString(ARGS_MESSAGE);%0A%0A        ProgressDialog dialog = new ProgressDialog(activity);%0A        dialog.setTitle(title);%0A        dialog.setMessage(message);%0A%0A        return dialog;%0A    %7D%0A%0A    @Override%0A    public void onCancel(DialogInterface dialog) %7B%0A        super.onCancel(dialog);%0A%0A        Fragment target = getTargetFragment();%0A        if (target == null) %7B return; %7D%0A%0A        Bundle args = getArguments();%0A        Bundle extra = args.getBundle(ARGS_EXTRA);%0A%0A        Intent data = new Intent();%0A        data.putExtra(EXTRA_DATA, extra);%0A%0A        target.onActivityResult(getTargetRequestCode(), Activity.RESULT_CANCELED, data);%0A    %7D%0A%7D%0A

Add ProgressDialogFragment