Example usage for android.app ProgressDialog setIndeterminate

List of usage examples for android.app ProgressDialog setIndeterminate

Introduction

In this page you can find the example usage for android.app ProgressDialog setIndeterminate.

Prototype

public void setIndeterminate(boolean indeterminate) 

Source Link

Document

Change the indeterminate mode for this ProgressDialog.

Usage

From source file:com.mobicage.rogerthat.util.ui.UIUtils.java

public static ProgressDialog showProgressDialog(final Context context, CharSequence title, CharSequence message,
        boolean indeterminate, boolean cancelable, DialogInterface.OnCancelListener onCancelListener,
        int progressStyle, boolean show) {
    ProgressDialog dialog = new ProgressDialog(context);
    dialog.setTitle(title);//w  w  w. ja va  2 s.c  o m
    dialog.setMessage(message);
    dialog.setIndeterminate(indeterminate);
    dialog.setCancelable(cancelable);
    dialog.setProgressNumberFormat(null);
    dialog.setProgressPercentFormat(null);
    dialog.setOnCancelListener(onCancelListener);
    dialog.setProgressStyle(progressStyle);
    dialog.setOnShowListener(new ProgressDialog.OnShowListener() {
        @Override
        public void onShow(DialogInterface dialog) {
            ProgressDialog progressDialog = (ProgressDialog) dialog;
            ProgressBar progressBar = (ProgressBar) progressDialog.findViewById(android.R.id.progress);
            UIUtils.setColors(context, progressBar);
        }
    });
    if (show) {
        dialog.show();
    }
    return dialog;
}

From source file:hu.naturlecso.naturshutd.dialog.ProgressDialogFragment.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    ProgressDialog dialog = new ProgressDialog(getActivity());
    dialog.setIndeterminate(true);
    dialog.setMessage(getString(R.string.dialog_execute_progress));
    return dialog;
}

From source file:fr.enseirb.odroidx.remote_client.UI.ScanningDialog.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    ProgressDialog dialog = new ProgressDialog(getActivity());
    dialog.setTitle("Scanning...");
    dialog.setIndeterminate(true);
    return dialog;
}

From source file:org.pixmob.freemobile.netstat.ui.ExportDialogFragment.java

public void update(int current, int total) {
    final ProgressDialog dialog = (ProgressDialog) getDialog();
    if (dialog != null) {
        dialog.setIndeterminate(false);
        dialog.setMax(total);//w ww.jav  a  2 s  . c  o  m
        dialog.setProgress(current);
    }
}

From source file:org.hedgewars.hedgeroid.ConnectingDialog.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    ProgressDialog dialog = new ProgressDialog(getActivity());
    dialog.setIndeterminate(true);
    dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    dialog.setTitle(R.string.dialog_connecting_title);
    dialog.setMessage(getString(R.string.dialog_connecting_message));
    return dialog;
}

From source file:com.douncoding.noe.ui.component.ProgressDialogFragment.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    ProgressDialog dialog = new ProgressDialog(getActivity());
    dialog.setMessage(getArguments().getString(KEY_TITLE));
    dialog.setIndeterminate(true);
    dialog.setCancelable(false);/*from w  w  w.  j  a  v  a2 s  . c  om*/
    dialog.setCanceledOnTouchOutside(false);
    return dialog;
}

From source file:org.retroshare.android.ConnectingToServiceFragmentDialog.java

@Override
public Dialog onCreateDialog(final Bundle savedInstanceState) {
    final ProgressDialog dialog = new ProgressDialog(getActivity());
    dialog.setMessage(getString(R.string.connecting_to_rsproxy));
    dialog.setIndeterminate(true);
    dialog.setCancelable(false);//from w w  w .  j a v  a 2 s. co  m
    return dialog;
}

From source file:gov.wa.wsdot.android.wsdot.util.ProgressDialogFragment.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    ProgressDialog dialog = new ProgressDialog(getActivity(), getTheme());
    dialog.setMessage(getArguments().getString("message"));
    dialog.setIndeterminate(true);
    dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    return dialog;
}

From source file:com.commonsware.android.progdlg.SampleDialogFragment.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    ProgressDialog dlg = new ProgressDialog(getActivity());

    dlg.setMessage(getActivity().getString(R.string.dlg_title));
    dlg.setIndeterminate(true);
    dlg.setProgressStyle(ProgressDialog.STYLE_SPINNER);

    return (dlg);
}

From source file:com.akalizakeza.apps.ishusho.activity.ProgressDialogFragment.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    ProgressDialog dialog = new ProgressDialog(getActivity(), getTheme());
    dialog.setMessage(getArguments().getString(KEY_TITLE));
    dialog.setIndeterminate(true);
    dialog.setCancelable(false);/*w  w  w .j a  v  a  2 s .  c o  m*/
    dialog.setCanceledOnTouchOutside(false);
    return dialog;
}