开发者

ProgressDialog loading animation stuck/frozen after 2-3 spins

I've been trying to set-up a ProgressDialog (which somewhat works), but it seems to freeze (the animation of the little wh开发者_运维百科eel thing) after about 2-3 spins. The data does eventually load, and the ProgresssDialog gets dismissed - so, all works fine, other than the fact that it freezes after 2-3 spins.

Here's a snip of the code:

// setting up loader
summaryLoader = ProgressDialog.show(SummaryView.this, "", "Loading summary...", false, true);

// settings up and starting the helper thread that's going to load the summery data
Thread t = new Thread() {
  @Override
  public void run() {
    _populateSummary();
  }
};
t.start();

I'm running this on an Entourage Edge running Android 1.6.

I did read about some issues with 1.6 and the animation freezing, but I thought I'd give this a shot and see if anyone here has some ideas.


I think though it runs on a thread it still takes a considerable amount of CPU usage.You can try setting the priority for your thread before you start it and see if it solves your problem though it would have an impact on the execution speed.

 t.setPriority(Thread.MIN_PRIORITY);

Else try using a Async task

Android ASync task ProgressDialog isn't showing until background thread finishes

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜