开发者

code for please wait the values are loading statement is appearing when we move from one intent to another intent

I am move from one intent to another intent,th开发者_StackOverflow中文版e 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


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(..).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜