开发者

Progressdialog slow to show in Android

I'm sure this is a simple threading issue but...

I'm starting a ProgressDialog using:

ProgressDialog.show(Example.this, " " , " Loading. Please wait ... ", true,true);

Then running a block of code to download and parse XML.

The problem I'm having is that this is all running under a onClick button method, and that th开发者_开发百科e xml is downloaded and parsed before the dialog is shown.

Any help would be greatly appreciated!


This is almost certainly a threading issue. Threads are our friends (even if they are annoying to use). That tutorial you found is pretty nice, but I'd suggest you check out the AsyncTask class... it makes life easier. There's a nice writeup on it here.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜