Android ProgressDialog Create getProgressBar(Context context, int max)

Here you can find the source of getProgressBar(Context context, int max)

Description

get Progress Bar

Declaration

public static ProgressDialog getProgressBar(Context context, int max) 

Method Source Code

//package com.java2s;

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

public class Main {
    public static ProgressDialog getProgressBar(Context context, int max) {
        ProgressDialog mProgressDialog = new ProgressDialog(context);
        mProgressDialog.setIndeterminate(false);
        mProgressDialog.setMax(max);/*from ww  w  .  j a  v  a  2s.c o  m*/
        mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
        mProgressDialog.setMessage("Please wait");

        return mProgressDialog;
    }
}

Related

  1. getProgressDialog(Context context, String message)
  2. getProgressDialog(Context context, String message, boolean CanceledOnTouchOutside, boolean cancelAble)
  3. getProgressDialog(Context context, int message)