Example usage for android.app ProgressDialog show

List of usage examples for android.app ProgressDialog show

Introduction

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

Prototype

public void show() 

Source Link

Document

Start the dialog and display it on screen.

Usage

From source file:Main.java

public static void showProgress(Context context) {
    ProgressDialog dialog = new ProgressDialog(context);
    dialog.show();
}

From source file:Main.java

public static void progressDialogShow(ProgressDialog dialog, String title) {
    dialog.setMessage(title);
    dialog.show();
}

From source file:Main.java

public static void showDialog(ProgressDialog dialog, String message) {
    dialog.setMessage(message);
    dialog.show();
}

From source file:Main.java

public static ProgressDialog showDialog(Activity context,
        @SuppressWarnings("SameParameterValue") String strContent) {
    if (context != null) {
        ProgressDialog infoDialog = new ProgressDialog(context);
        infoDialog.setMessage(strContent);
        infoDialog.show();
        return infoDialog;
    }/*from  w ww. j  a  v  a 2s  .c om*/
    return null;
}

From source file:Main.java

public static ProgressDialog showProgressDialog(Context context, String titleText, String processingText) {
    ProgressDialog progress = new ProgressDialog(context);
    progress.setTitle(titleText);/*ww w  . java2  s.  c om*/
    progress.setMessage(processingText);
    progress.show();
    return progress;
}

From source file:Main.java

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

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

From source file:Main.java

public static ProgressDialog showProgressDialog(Context context, String title, String message) {
    ProgressDialog pd = new ProgressDialog(context);
    pd.setTitle(title);/*w ww .j  a  v  a 2 s . c om*/
    pd.setMessage(message);
    if (pd != null && !pd.isShowing())
        pd.show();
    return pd;
}

From source file:Main.java

public static Dialog backgroundProcess(Context context, final Runnable run, final boolean showDialog,
        String loadingComment) {/*  w  ww .j a va 2s  .c  o m*/
    final ProgressDialog progressdialog = creativeProgressBar(context, loadingComment);
    if (showDialog)
        progressdialog.show();
    Runnable wrapper = new Runnable() {
        public void run() {
            run.run();
            if (showDialog)
                progressdialog.dismiss();
        }
    };
    Thread thread = new Thread(wrapper);
    thread.setDaemon(true);
    thread.start();
    return progressdialog;
}

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);//  w ww .ja  v  a 2s  .com
    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 . j  ava 2 s. c  o  m*/
    dialog.setMessage(message);
    dialog.setIndeterminate(indeterminate);
    dialog.setCancelable(cancelable);
    dialog.show();
    return dialog;
}