Hi,I am move from one intent to another intent,the another intent collects the data from our own data base so,it takes so much time for appearing .In that idle time I want to display a animation like progerss dialogue etc.pleae give me the suggestions
views:
21answers:
1
A:
This snippet should give you an idea:
public static ProgressDialog getSpinningProgressDialog(Context ctx,
int messageId) {
ProgressDialog dialog = new ProgressDialog(ctx);
dialog.setProgressStyle(STYLE_SPINNER);
dialog.setCancelable(false);
dialog.setMessage(ctx.getString(messageId));
return dialog;
}
And Activity
can manage dialogs itself, look for onCreateDialog(..)
, showDialog(..)
, dismissDialog(..)
.
alex
2010-02-19 06:42:42