If I'm not mistaken, any code inside a TimerTask is running on a different thread. This means that it won't have access to the main UI thread. So if you put some code in there to update your Textview, you will probably end up with an exception or error saying that it cannot access the main ui thread. To fix this, you will need to create a message handler (Handler) so that you can send "messages" to your main ui thread telling it to update the Textview accordingly.
On Tuesday, March 13, 2012 1:20:18 PM UTC+9, Ali wrote: > > Hi > i have made a timer and a timer task, and i need to update my textview > every seconds > how can i do that? > thanks > -- 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

