tags:

views:

21

answers:

1

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

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