Example usage for android.app ProgressDialog STYLE_SPINNER

List of usage examples for android.app ProgressDialog STYLE_SPINNER

Introduction

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

Prototype

int STYLE_SPINNER

To view the source code for android.app ProgressDialog STYLE_SPINNER.

Click Source Link

Document

Creates a ProgressDialog with a circular, spinning progress bar.

Usage

From source file:Main.java

public static ProgressDialog loader(Context context) {
    ProgressDialog loader = new ProgressDialog(context, ProgressDialog.STYLE_SPINNER);
    loader.setIndeterminate(false);// www. j ava 2s  .c  o  m
    loader.setCancelable(false);
    return loader;
}

From source file:Main.java

public static ProgressDialog makeProgressDialog(Context ctx) {
    ProgressDialog p = new ProgressDialog(ctx);
    p.setCancelable(false);/*from ww w .  ja v a2 s .  c  o m*/
    p.setCanceledOnTouchOutside(false);
    p.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    p.setIndeterminate(true);
    return p;
}

From source file:Main.java

public static Dialog setLoadingDialog(Activity activity, String message) {
    ProgressDialog progressDialog = new ProgressDialog(activity);
    progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    progressDialog.setMessage(message);/*from  ww  w.j a v a  2 s  .c o m*/
    return progressDialog;
}

From source file:Main.java

public static ProgressDialog setupProgressDialog(Context ctx) {
    ProgressDialog progressDialog = new ProgressDialog(ctx);
    progressDialog.setIndeterminate(true);
    progressDialog.setCancelable(false);
    progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    progressDialog.setMessage("Loading...");
    return progressDialog;
}

From source file:Main.java

public static void showProgressDlg(Context ctx, String strMessage) {

    if (null == progressDlg) {
        if (ctx == null)
            return;
        progressDlg = new ProgressDialog(ctx);
        progressDlg.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        progressDlg.setMessage(strMessage);
        progressDlg.setIndeterminate(false);
        progressDlg.setCancelable(true);
        progressDlg.show();//from   w  w  w . java2s. c  om
    }
}

From source file:Main.java

private static synchronized void initDialog(Context ctx, String s) {
    if (loadingDialog == null && ctx != null) {
        loadingDialog = new ProgressDialog(ctx);
        loadingDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        loadingDialog.setMessage(s);//from  w  w w.j ava 2s. com
        loadingDialog.setCanceledOnTouchOutside(false);
    } else if (loadingDialog != null && ctx != null && loadingDialog.isShowing()) {
        loadingDialog.dismiss();
    }
}

From source file:Main.java

public static ProgressDialog getCustomProgressDialog(Context context, String content,
        boolean canceledOnTouchOutside, int dialogTheam) {
    ProgressDialog progressDialog = dialogTheam == 0 ? new ProgressDialog(context)
            : new ProgressDialog(context, dialogTheam);
    progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    progressDialog.setMessage(content);/*from  w  w w.ja v  a  2s .c  o  m*/
    progressDialog.setIndeterminate(true);
    progressDialog.setCanceledOnTouchOutside(canceledOnTouchOutside);
    return progressDialog;
}

From source file:Main.java

public static ProgressDialog startProgressBar(final Activity activity) {
    activity.runOnUiThread(new Runnable() {

        public void run() {
            // pBar = ProgressBar.makeText(activity, text, duration);
            pDialog = new ProgressDialog(activity);
            pDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
            pDialog.setMessage("Laden");
            pDialog.setCancelable(false);
            pDialog.show();//w ww  . j a  v  a 2  s.c om
        }
    });

    return pDialog;
}

From source file:com.nkahoang.screenstandby.settings.UpdateChecker.java

public static void CheckForUpdate(Context c) {
    progressDialog = new ProgressDialog(c);
    progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER | ProgressDialog.THEME_HOLO_DARK);
    progressDialog.setTitle("Checking for update");
    progressDialog.setMessage("Please wait...\n");
    progressDialog.setCancelable(false);
    progressDialog.setIcon(android.R.drawable.ic_menu_upload);
    progressDialog.setIndeterminate(true);
    progressDialog.show();/*from   w  w  w  .ja  v a 2  s.c  o  m*/
    new LoadViewTask(c).execute();
}

From source file:org.deviceconnect.android.deviceplugin.linking.setting.fragment.dialog.DiscoveryDeviceDialogFragment.java

@NonNull
@Override//from  ww w .j av a  2 s  .  c o  m
public Dialog onCreateDialog(final Bundle savedInstanceState) {
    String message = getArguments().getString(EXTRA_MESSAGE);
    ProgressDialog progressDialog = new ProgressDialog(getActivity());
    progressDialog.setMessage(message);
    progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    progressDialog.setCancelable(false);
    return progressDialog;
}