On Dec 21, 6:15 pm, Mark Murphy <[email protected]> wrote:
> Keith Wiley wrote:
> > I'm trying to put up a progress bar while reading and processing a
> > file.  I'm open to title bar vs dialog and determinate vs.
> > indeterminate.  At this point I don't care, I just want to get
> > something working.  The problem occurs as the working thread attempts
> > to turn the progress bar off.  At that point the program crashes.  In
> > the example below ".F" is never written to the log.
>
> You don't indicate what the error is from your log.

The error log is empty.  The only behavior is a crash.  The debugger
stops at ViewRoot.checkThread() line 1849.  The call stack doesn't
contain any of my classes/functions.  It's coming from the system.

> That being said, you are calling
> setProgressBarIndeterminateVisibility(false); from the background
> thread. Since this probably has an impact on the UI, you probably cannot
> call this safely from a background thread.
>
> Instead, arrange to call it on the UI thread, either via a Handler,
> Activity#runOnUiThread(), View#post(), etc.

Okay.  Thanks.  I needed to figure out some way to detect when to
close progress bar.  I admit, I was a little unsure of the best way to
do it.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to