super.onCreate(icicle);
setContentView(R.layout.progressbar_3);
Button button = (Button) findViewById(R.id.showProgress);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
mCancelled = false;
mProgress = 0;
OnCancelListener cancelListener = new OnCancelListener() {
public void onCancel(DialogInterface dialog) {
mCancelled = true;
//todo: remove before submiting
// Log.v("ProgressBarTest", "Canceled the progress bar.");
}
};
mDialog = ProgressDialog.show(ProgressBar3.this,
"Doing Stuff", "Please wait while loading...", false,
true, cancelListener);
mHandler.sendMessage(mHandler.obtainMessage(PROGRESS));
}
});
button = (Button) findViewById(R.id.showIndeterminate);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
ProgressDialog.show(ProgressBar3.this,
"Indeterminate", "Please wait while loading...", true,
true);
}
});
button = (Button) findViewById(R.id.showIndeterminateNoTitle);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
ProgressDialog.show(ProgressBar3.this,
null, "Please wait while loading...", true, true);
}
});