call the show() method to start the ProgressDialog, and call dismiss() method to remove it from the screen (refer to the next article ProgressDialog + Thread).
package com.exercise.AndroidProgressDialog;
import android.app.Activity;
import android.app.ProgressDialog;
import android.os.Bundle;
public class AndroidProgressDialogActivity extends Activity {
ProgressDialog progressDialog;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
progressDialog = ProgressDialog.show(AndroidProgressDialogActivity.this,
"ProgressDialog", "Wait!");
/*
* To stop the ProgressDialog, call progressDialog.dismiss();
*/
}
}
next:
- ProgressDialog + Thread
No comments:
Post a Comment