Android ProgressDialog Create getProgressDialog(Context context, String message, boolean CanceledOnTouchOutside, boolean cancelAble)

Here you can find the source of getProgressDialog(Context context, String message, boolean CanceledOnTouchOutside, boolean cancelAble)

Description

get Progress Dialog

Declaration

public static ProgressDialog getProgressDialog(Context context,
            String message, boolean CanceledOnTouchOutside,
            boolean cancelAble) 

Method Source Code

//package com.java2s;

import android.app.ProgressDialog;
import android.content.Context;

public class Main {
    public static ProgressDialog getProgressDialog(Context context,
            int message) {
        return getProgressDialog(context, context.getString(message));
    }/*  w  w w  .  ja  va 2 s .co  m*/

    public static ProgressDialog getProgressDialog(Context context,
            String message) {
        return getProgressDialog(context, message, false, true);
    }

    public static ProgressDialog getProgressDialog(Context context,
            String message, boolean CanceledOnTouchOutside,
            boolean cancelAble) {
        ProgressDialog progressDialog = new ProgressDialog(context);
        progressDialog.setMessage(message);
        progressDialog.setCanceledOnTouchOutside(CanceledOnTouchOutside);
        progressDialog.setCancelable(cancelAble);
        return progressDialog;
    }
}

Related

  1. getProgressDialog(Context context, String message)
  2. getProgressDialog(Context context, int message)
  3. getProgressBar(Context context, int max)