Wait for inline thread to complete before moving to next method...
Posted
by Tyler
on Stack Overflow
See other posts from Stack Overflow
or by Tyler
Published on 2010-05-18T20:56:15Z
Indexed on
2010/05/18
21:00 UTC
Read the original article
Hit count: 159
Hello,
I have an android app where I am doing the following:
private void onCreate() {
final ProgressDialog dialog = ProgressDialog.show(this, "Please wait..", "Doing stuff..", true);
new Thread() {
public void run() {
//do some serious stuff...
dialog.dismiss();
}
}.start();
stepTwo();
}
And I would like to ensure that my thread is complete before stepTwo(); is called. How can I do this?
Thanks!
© Stack Overflow or respective owner