Loading

Saturday, July 16, 2011

ProgressDialog

android.app.ProgressDialog is a dialog showing a progress indicator and an optional text message or view.

ProgressDialog

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

SHARE TWEET

Thank you for reading this article ProgressDialog With URL http://x-tutorials.blogspot.com/2011/07/progressdialog.html. Also a time to read the other articles.

0 comments:

Write your comment for this article ProgressDialog above!