Example usage for android.app ProgressDialog ProgressDialog

List of usage examples for android.app ProgressDialog ProgressDialog

Introduction

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

Prototype

public ProgressDialog(Context context) 

Source Link

Document

Creates a Progress dialog.

Usage

From source file:asynctasks.LoadTaskTicketDataAsync.java

@Override
protected void onPreExecute() {
    pDialog = new ProgressDialog(context);
    pDialog.setMessage("Retrieving Data...");
    pDialog.setIndeterminate(false);//ww w.  j  ava  2s . co m
    pDialog.setCancelable(false);
    pDialog.show();
}

From source file:com.paramedic.mobshaman.activities.AccessTimeActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getSupportActionBar().setHomeButtonEnabled(true);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    pDialog = new ProgressDialog(this);
    pDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    configuration = Configuration.getInstance(this);
    intent = new Intent(this, ServiciosActivity.class);
    setContentView(R.layout.activity_access_time);
    initializeUI();//from  ww  w  .j av a  2 s .c  om
}

From source file:edu.usf.cutr.opentripplanner.android.serialization.TripRequest.java

public TripRequest(Context context, TripRequestCompleteListener callback) {
    this.context = context;
    this.callback = callback;
    progressDialog = new ProgressDialog(context);
}

From source file:ie.programmer.catcher.browser.AsyncTasks.AsyncDeleteTask.java

protected void onPreExecute() {
    if (mSourceFile == null)
        return;/*from ww  w . java 2 s . c om*/
    //Skip the rest of this method if the user doesn't want a progress dialog.
    if (!mShowProgress)
        return;
    pd = new ProgressDialog(mContext);
    pd.setCancelable(false);
    pd.setIndeterminate(false);
    pd.setTitle(R.string.delete);
    pd.setMessage(mContext.getResources().getString(R.string.deleting) + " " + mSourceFile.getName());
    pd.setButton(DialogInterface.BUTTON_NEUTRAL, mContext.getResources().getString(R.string.run_in_background),
            new OnClickListener() {
                @Override
                public void onClick(DialogInterface arg0, int arg1) {
                    pd.dismiss();
                }
            });
    pd.show();
    if (mDeleteInterface != null)
        mDeleteInterface.preDeleteStartSync();
}

From source file:com.grarak.romswitcher.Utils.Utils.java

public static void displayprogress(String message, final Context context) {
    mProgressDialog = new ProgressDialog(context);
    mProgressDialog.setMessage(message);
    mProgressDialog.setIndeterminate(false);
    mProgressDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
        @Override/*from  ww w  .  j a va2s .  c  o  m*/
        public void onDismiss(DialogInterface dialog) {
            ((Activity) context).finish();
        }
    });
    mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    mProgressDialog.show();
}

From source file:com.SecUpwN.AIMSICD.activities.OpenCellIdActivity.java

public void onAcceptedClicked(View v) {
    pd = new ProgressDialog(this);
    pd.setMessage(getString(R.string.getting_ocid_key));
    pd.show();/*from w w w.j av a 2 s. c  o m*/

    OpenCellIdKeyDownloaderTask ocikd = new OpenCellIdKeyDownloaderTask();
    ocikd.execute(); //starts background thread
}

From source file:fm.krui.kruifm.DJInfoFetcher.java

@Override
protected void onPreExecute() {

    // Create ProgressDialog and display during network request
    String pdTitle = activity.getResources().getString(R.string.loading_dj_information);
    String pdMessage = activity.getResources().getString(R.string.please_wait);
    pd = new ProgressDialog(activity);
    pd.setTitle(pdTitle);/*  ww  w . ja  v  a  2  s  .c  o m*/
    pd.setMessage(pdMessage);
    pd.show();
}

From source file:com.psaravan.filebrowserview.lib.AsyncTasks.AsyncDeleteTask.java

protected void onPreExecute() {

    if (mSourceFile == null)
        return;/* www .j  a  v a 2 s. c om*/

    //Skip the rest of this method if the user doesn't want a progress dialog.
    if (!mShowProgress)
        return;

    pd = new ProgressDialog(mContext);
    pd.setCancelable(false);
    pd.setIndeterminate(false);
    pd.setTitle(R.string.delete);
    pd.setMessage(mContext.getResources().getString(R.string.deleting) + " " + mSourceFile.getName());
    pd.setButton(DialogInterface.BUTTON_NEUTRAL, mContext.getResources().getString(R.string.run_in_background),
            new OnClickListener() {

                @Override
                public void onClick(DialogInterface arg0, int arg1) {
                    pd.dismiss();

                }

            });

    pd.show();

    if (mDeleteInterface != null)
        mDeleteInterface.preDeleteStartSync();

}

From source file:com.example.clienttest.AbstractGreenhouseActivity.java

public void showProgressDialog(String message) {
    if (progressDialog == null) {
        progressDialog = new ProgressDialog(this);
        progressDialog.setIndeterminate(true);
    }//  w w  w  . j  av  a  2  s  .co  m

    progressDialog.setMessage(message);
    progressDialog.show();
}

From source file:com.tealeaf.ResourceDownloaderTask.java

public ResourceDownloaderTask(Activity context, String host, int port, AppInfo appInfo) {
    this.host = host;
    this.port = port;
    this.appInfo = appInfo;
    this.progressDialog = new ProgressDialog(context);
    this.progressDialog.setProgressStyle(1); //horizontal
    this.progressDialog.setMax(100);
    this.context = context;
    this.lastFilename = null;
    this.errorDownloading = false;

}