Unfortunately it's much more complicated that it looks like. Check out this thread: http://bit.ly/i5e9Eq
Cheers Emanuel Moecklin On Apr 6, 12:45 am, SD315 <[email protected]> wrote: > Hello, i'm trying to do some work in a thread while showing a progress > dialog until the work is done in the most simple possible way, so far > i got this: > > // "this" is the current activity > final ProgressDialog prgDialog = ProgressDialog.show(this, "", > "Working...", true, false); > > new Thread() { > public void run() > { > Util.DoSomeWork(); // a static method > prgDialog.dismiss(); > }}.start(); > > at least it work fine in the emulator, but i'm concerned about it's > correctness, specifically about calling prgDialog.dismiss(); (note > that the variable prgDialog is created in the main thread), is this > correct? > > bye -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

