[android-developers] Re: How to show my ProgressBar

2009-03-24 Thread iDeveloper
Make use of Handlers to tell the main thread when the other thread has stopped or completed its task. final Handler handler = new Handler() { @Override public void handleMessage(Message message) { //do something here. Will be done on main thread } }; Use

[android-developers] Re: How to show my ProgressBar

2009-03-24 Thread guishenl...@gmail.com
I still have some question on it. If I put the backgroundWork() in another thread, how can the main UI thread know background thread has finished? And how to pause the main UI thread to wait for backgroundWork(). On Mar 25, 12:44 pm, Marco Nelissen wrote: > The problem is that your 'backgroundWo

[android-developers] Re: How to show my ProgressBar

2009-03-24 Thread guishenl...@gmail.com
Thank you for your reply! On Mar 25, 12:44 pm, Marco Nelissen wrote: > The problem is that your 'backgroundWork()" method is not actually > running in the background, but in the main UI thread. You'll need to > do the work in a separate thread. > > On Tue, Mar 24, 2009 at 8:02 PM, guishenl...@gm

[android-developers] Re: How to show my ProgressBar

2009-03-24 Thread Marco Nelissen
The problem is that your 'backgroundWork()" method is not actually running in the background, but in the main UI thread. You'll need to do the work in a separate thread. On Tue, Mar 24, 2009 at 8:02 PM, guishenl...@gmail.com wrote: > > I want to show a ProgressBar while doing some background op