On Wed, Sep 16, 2009 at 6:15 PM, rukiman <[email protected]> wrote:
>
> OK I should re-ask my question so its a bit more clearer.
>
> in updateResultsInUI() it is updating the results obtained from the
> doSomethingExpensive() which was calculated in the worker thread. Now
> what if doSomethingExpensive() is run in a loop continuously and each
> time it is executed I need to update something in the UI based on the
> result of doSomethingExpensive()? How can I achieve this?

View.post(Runnable)
http://developer.android.com/reference/android/view/View.html#post(java.lang.Runnable)

A better way is to create a Handler in your main thread and send it a message.

R/

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