If your textview in main UI thread, try method : runOnUiThread(action)
Another way to share data between thread:
 + Content Provider
 + Database (Sqlite)
 + Using one static class
 ...
-CMV-
On Sun, Aug 2, 2009 at 6:55 AM, Illidane <[email protected]> wrote:

>
> Can you give an example?
>
> On 2 авг, 01:31, MrChaz <[email protected]> wrote:
> > You can't update a UI component from a thread that isn't the main (UI )
> > thread.
> > You ought to be able to post() back to the main thread.
> >
> > On Aug 1, 10:02 pm, Illidane <[email protected]> wrote:
> >
> >
> >
> > > Hi!
> > > I'm writing some game using OpenGL and have two views : SurfaceView
> > > for OGL and TextView for my score. When I try to update score ( using
> > > BoardScore.setText("bla"); ) from my activity class all just fine, but
> > > when I try to do it from my logic class my app crash. Debugger says
> > > something like ViewRoot$CalledFromWrongThreadException
> > > (id=830053983760)
> > > But I need to update it from logic to know my score.
> > > Do you know something about this issue?
> >
> > > Thanks for help.
> >
>


-- 
CMV

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