Example usage for android.app ProgressDialog setMessage

List of usage examples for android.app ProgressDialog setMessage

Introduction

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

Prototype

@Override
    public void setMessage(CharSequence message) 

Source Link

Usage

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 void progress(ProgressDialog pdialog, String msg) {

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

From source file:Main.java

public static ProgressDialog buildProgressDialog(Context ctx, String message, boolean cancelable) {
    ProgressDialog pd = new ProgressDialog(ctx);
    pd.setMessage(message);
    pd.setCancelable(cancelable);/*from w ww.  ja  v  a  2  s  .  c  o m*/

    return pd;
}

From source file:Main.java

public static ProgressDialog getProcessDialog(Context context, String tips) {
    ProgressDialog dialog = new ProgressDialog(context);
    dialog.setMessage(tips);
    dialog.setCancelable(false);//from www  .j a v a2 s.c  o  m
    return dialog;
}

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();/*from  w w w .j a va  2  s .c  o  m*/
        return infoDialog;
    }
    return null;
}

From source file:Main.java

public static ProgressDialog showProgressDialog(Context context, String text) {
    if (null != context) {
        ProgressDialog dialog = new ProgressDialog(context);
        dialog.setMessage(text);
        dialog.setIndeterminate(true);// www  .j a v  a 2 s. co  m
        dialog.setCancelable(false);
        dialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
        dialog.show();
        return dialog;
    }
    return null;
}

From source file:Main.java

public static ProgressDialog showProgressDialog(Context context, String title, String message) {
    ProgressDialog pd = new ProgressDialog(context);
    pd.setTitle(title);//from   www . ja va  2 s .c o m
    pd.setMessage(message);
    if (pd != null && !pd.isShowing())
        pd.show();
    return pd;
}

From source file:Main.java

public static ProgressDialog createProgressDialog(Context context, String title, String message) {
    ProgressDialog pDialog = new ProgressDialog(context);
    pDialog.setTitle(title);/*from   ww w .j a  v a  2  s  .c o  m*/
    pDialog.setMessage(message);
    return pDialog;
}

From source file:Main.java

public static ProgressDialog showProgressDialog(Context context) {
    ProgressDialog myProgressDialog = new ProgressDialog(context);
    myProgressDialog.setMessage("Please wait...");
    myProgressDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
    myProgressDialog.show();/*from   w  w  w  . j  av a2s.c o m*/
    myProgressDialog.setCancelable(false);
    myProgressDialog.setOnKeyListener(new DialogInterface.OnKeyListener() {

        public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
            if (keyCode == KeyEvent.KEYCODE_SEARCH && event.getRepeatCount() == 0) {
                return true;
            }
            return false;
        }

    });
    return myProgressDialog;
}