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: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 ProgressDialog createProgressDialog(String message, Context context) {
    ProgressDialog progressDialog = new ProgressDialog(context);
    progressDialog.setIndeterminate(true);
    progressDialog.setCancelable(true);/*from   ww  w. j a v a  2 s  . co m*/
    progressDialog.setMessage(message);

    return progressDialog;
}

From source file:Main.java

private static ProgressDialog createProgressDialog(Context context, String message) {

    ProgressDialog dialog = new ProgressDialog(context);
    dialog.setIndeterminate(false);
    dialog.setMessage(message);//from   w w w.j av a  2s  .  co m

    return dialog;
}

From source file:Main.java

public static void progress(ProgressDialog pdialog, String msg) {

    pdialog.setMessage(msg);//from  ww w. j  a v a 2  s  .  c om
    pdialog.setIndeterminate(false);
    pdialog.setCancelable(false);
    pdialog.show();
}

From source file:Main.java

public static ProgressDialog loader(Context context) {
    ProgressDialog loader = new ProgressDialog(context, ProgressDialog.STYLE_SPINNER);
    loader.setIndeterminate(false);
    loader.setCancelable(false);//from ww  w . j  ava  2 s . co  m
    return loader;
}

From source file:Main.java

public static ProgressDialog createDialog(Context ct) {
    ProgressDialog progressDialog;

    progressDialog = new ProgressDialog(ct);
    progressDialog.setIndeterminate(true);
    progressDialog.setCancelable(true);// w  w w  .  j  a va2 s  . co  m
    progressDialog.setCanceledOnTouchOutside(true);

    return progressDialog;
}

From source file:Main.java

public static ProgressDialog showProgressDialog(Context context, String text) {
    if (null != context) {
        ProgressDialog dialog = new ProgressDialog(context);
        dialog.setMessage(text);/*from w w  w  .  j  av a2  s .com*/
        dialog.setIndeterminate(true);
        dialog.setCancelable(false);
        dialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
        dialog.show();
        return dialog;
    }
    return null;
}

From source file:Main.java

public static ProgressDialog showProgress(Context context, CharSequence title, CharSequence message,
        boolean indeterminate, boolean cancelable) {
    ProgressDialog dialog = new ProgressDialog(context);
    dialog.setTitle(title);//from   w w  w.j a va2s  .c o  m
    dialog.setMessage(message);
    dialog.setIndeterminate(indeterminate);
    dialog.show();
    return dialog;
}

From source file:Main.java

public static ProgressDialog showProgress(Context context, CharSequence title, CharSequence message,
        boolean indeterminate, boolean cancelable) {
    ProgressDialog dialog = new ProgressDialog(context);
    dialog.setTitle(title);//from   w  w w . jav  a  2s. com
    dialog.setMessage(message);
    dialog.setIndeterminate(indeterminate);
    dialog.setCancelable(cancelable);
    dialog.show();
    return dialog;
}

From source file:Main.java

public static ProgressDialog showProgress(Context context, CharSequence title, CharSequence message,
        boolean indeterminate, boolean cancelable) {
    ProgressDialog dialog = new ProgressDialog(context);
    dialog.setTitle(title);/*from  w ww  .  j  av a 2s  .co m*/
    dialog.setMessage(message);
    dialog.setIndeterminate(indeterminate);
    dialog.setCancelable(cancelable);
    // dialog.setDefaultButton(false);

    dialog.show();
    return dialog;
}