Saturday, 16 July 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

Borneo08

About Borneo08

Author Description here.. Nulla sagittis convallis. Curabitur consequat. Quisque metus enim, venenatis fermentum, mollis in, porta et, nibh. Duis vulputate elit in elit. Mauris dictum libero id justo.

Subscribe to this Blog via Email :

More links

Related Posts Plugin for WordPress, Blogger...