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:org.silena.main.RegistrationOld.java

@Override
protected Dialog onCreateDialog(int dialogId) {
    ProgressDialog progress = null;//ww  w.j a v a  2  s .c  o m
    switch (dialogId) {
    case PROGRESS_DLG_ID:
        progress = new ProgressDialog(this);
        progress.setMessage("Loading...");

        break;
    }
    return progress;
}

From source file:com.gimranov.zandy.app.LookupActivity.java

protected Dialog onCreateDialog(int id) {
    switch (id) {
    case DIALOG_PROGRESS:
        mProgressDialog = new ProgressDialog(this);
        mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
        mProgressDialog.setIndeterminate(true);
        mProgressDialog.setMax(100);//w  w  w  .ja v a 2  s  .  c  om
        return mProgressDialog;
    default:
        Log.e(TAG, "Invalid dialog requested");
        return null;
    }
}

From source file:com.safecell.ManageProfile_Activity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setWindowAnimations(R.anim.null_animation);

    Intent callingIntent = getIntent();/*  w ww  .  j  av  a 2s .c o m*/
    callingActivity = callingIntent.getStringExtra("CallingActivity");

    context = ManageProfile_Activity.this;
    dialog = new ProgressDialog(context);
    licenseRepository = new LicenseRepository(context);
    intializesecondTitleLabelArray();
    intiUI();

    progressDialog = new ProgressDialog(context);
    licenseProgressDialog = new ProgressDialog(context);
    licenseThread = new LicenseThread();

    handleMessageFromThread();

    setListAdapter(new manageProfileListAdapter(ManageProfile_Activity.this));
    TabControler tabControler = new TabControler(ManageProfile_Activity.this);
    homeButton.setOnClickListener(tabControler.getHomeTabOnClickListner());

}

From source file:com.nanosheep.bikeroute.Feedback.java

@Override
public Dialog onCreateDialog(final int id) {
    AlertDialog.Builder builder;/*  ww  w  . j ava 2 s. c o  m*/
    ProgressDialog pDialog;
    Dialog dialog;
    switch (id) {
    case R.id.send:
        pDialog = new ProgressDialog(this);
        pDialog.setCancelable(true);
        pDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        pDialog.setMessage(getText(R.string.send_msg));
        pDialog.setOnDismissListener(new OnDismissListener() {
            @Override
            public void onDismiss(final DialogInterface arg0) {
                removeDialog(R.id.send);
            }
        });
        pDialog.setOnCancelListener(new OnCancelListener() {

            @Override
            public void onCancel(final DialogInterface arg0) {
                submitHandler.cancel(true);
            }

        });
        dialog = pDialog;
        break;
    case R.id.thanks:
        builder = new AlertDialog.Builder(this);
        builder.setMessage(getText(R.string.thanks_message)).setCancelable(true)
                .setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(final DialogInterface dialog, final int id) {
                        dialog.dismiss();
                        finish();
                    }
                });
        dialog = builder.create();
        break;
    case R.id.feedback_fail:
        builder = new AlertDialog.Builder(this);
        builder.setMessage(getText(R.string.feedback_fail_message)).setCancelable(true)
                .setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(final DialogInterface dialog, final int id) {
                        dialog.dismiss();
                    }
                });
        dialog = builder.create();
        break;
    default:
        dialog = null;
    }
    return dialog;
}

From source file:devza.app.android.droidnetkey.FirewallAction.java

@Override
protected void onPreExecute() {
    if (!refresh) {
        String st;//  w  w  w  .  ja v a  2s .  c  o m
        //String action;

        if (!fwstatus) {
            st = "Connecting...";
            //action = "login";
        } else {
            st = "Disconnecting...";
            //action = "logout";
        }
        d = new ProgressDialog(this.context);
        d.setCancelable(false);
        d.setIndeterminate(true);
        d.setMessage(st);

        try {
            d.show();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
}

From source file:com.primitive.library.task.DownloadTask.java

@Override
protected void onPreExecute() {
    this.progress = new ProgressDialog(this.owner);
    this.progress.setMessage("Downloading...");
    this.progress.setIndeterminate(false);
    this.progress.setCancelable(false);
    this.progress.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    // this.mProgressDialog.setMax(1);
    this.progress.show();
}

From source file:com.securekey.sdk.sample.VerifyQuickCodeActivity.java

/**
 * Assert user// ww w  .  j  a va2 s.c  o m
 * <p>
 * Gets Briidge object and calls briidge.assertUser
 * 
 * @param   passcode   user supplied quickcode
 */
private void asserUser(final String passcode) {

    mProgressDialog = new ProgressDialog(this);
    updateProgressDialog("Verifying");
    this.jwsExpected = false;

    EditText audiencesText = (EditText) findViewById(R.id.assert_audiences);
    String[] list = (audiencesText.length() == 0 ? (new String[] {})
            : audiencesText.getText().toString().split("\n"));
    SKAudience[] audiences = new SKAudience[list.length];

    for (int i = 0; i < audiences.length; i++) {
        audiences[i] = new SKAudience(list[i]);
    }

    BriidgePlatformFactory.getBriidgePlatform(VerifyQuickCodeActivity.this).assertUser(
            SDKSampleApp.getInstance().retrieveUserId(), passcode, audiences, VerifyQuickCodeActivity.this);
}

From source file:export.UploadManager.java

public UploadManager(Context context) {
    this.activity = null;
    this.context = context;
    mDBHelper = new DBHelper(context);
    mDB = mDBHelper.getWritableDatabase();
    mSpinner = new ProgressDialog(context);
    mSpinner.setCancelable(false);//from   w  ww  . jav a2s.c o m
}

From source file:com.almarsoft.GroundhogReader.SubscribeActivity.java

@Override
protected Dialog onCreateDialog(int id) {
    if (id == ID_DIALOG_SEARCHING) {
        ProgressDialog searchDialog = new ProgressDialog(this);
        searchDialog.setMessage("Searching matching groups...");
        searchDialog.setIndeterminate(true);
        searchDialog.setCancelable(true);
        return searchDialog;
    }//from w  ww .  jav  a  2  s .  co  m

    return super.onCreateDialog(id);
}