[android-developers] Re: Thread and ProgressDialog
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 <sailer...@gmail.com> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home