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
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
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
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
4 matches
Mail list logo