just send a message to the ui thread telling it to refresh
On Feb 10, 12:14 pm, Isuru Madusanka isurum@gmail.com wrote:
I am working on ProgressBar class in android, but I can't make it
progress through 5 seconds and load the application. Everything works
but the progress bar not
You want to wait for 5 sec before launching just so that you can show a
progress bar and appear to be doing something important? If you do, just
use a handler instantiated in the activity and post a runnable in the
thread which calls setProgress().
--
You received this message because you are
Actually you can update the UI from another thread with either
AsyncTask , or use what is called a Handler, and post a runnable to
the handler. The runnable will then contain the code to update the
progressbar. I usually use the Handler / Runnable method.
-niko
On Feb 10, 2:18 pm, TreKing
On Sun, Feb 12, 2012 at 9:04 AM, niko20 nikolatesl...@yahoo.com wrote:
Actually you can update the UI from another thread
Just to be clear, you cannot update the UI from another thread.
What you do, either via an AsyncTask, Handler, or whatever, is indirectly
update the UI via some messaging
4 matches
Mail list logo