Re: [android-developers] Re: Update a textview from another thread

2013-05-22 Thread Michael Leung
I added the hashtable in the main thread. It will loop the updated the value. But I think bob's method is better. I will try to rework into this method On Wed, May 15, 2013 at 4:43 PM, Michael Leung michaelchi...@gmail.comwrote: thank you so much! On Wed, May 15, 2013 at 2:43 AM, Marty

Re: [android-developers] Re: Update a textview from another thread

2013-05-15 Thread Michael Leung
thank you so much! On Wed, May 15, 2013 at 2:43 AM, Marty Ballard marty...@gmail.com wrote: Another option is to pass it in a bundle and set the text based on the values passed in that bundle. On Saturday, May 11, 2013 4:56:00 PM UTC-5, Michael Leung wrote: Is it possible to Update a

[android-developers] Re: Update a textview from another thread

2013-05-14 Thread Marty Ballard
Another option is to pass it in a bundle and set the text based on the values passed in that bundle. On Saturday, May 11, 2013 4:56:00 PM UTC-5, Michael Leung wrote: Is it possible to Update a textview from another thread? I got a list item in list view from another fragement. -- Regards,

Re: [android-developers] Re: Update a textview from another thread

2013-05-13 Thread bob
Yes. It will be something like this: *public class MainActivity extends Activity {* * * * public static Handler handler = new Handler();* In other thread: *MainActivity.handler.post(new Runnable() {* * * * @Override* * public void run() {* * tv.setText(test);* * * * }* * });*

Re: [android-developers] Re: Update a textview from another thread

2013-05-12 Thread Piren
or just use Handlers/postOnUIThread. On Sunday, May 12, 2013 8:14:27 AM UTC+3, Michael Leung wrote: Ok thanks. Maybe i use subscriber pattern to do that Regards, Michael Leung http://www.itblogs.info On 12/05/2013 8:29 AM, Jonathan S xfsu...@gmail.com javascript: wrote: No. TextView

[android-developers] Re: Update a textview from another thread

2013-05-11 Thread Jonathan S
No. TextView only be updated in the Main Thread. Why not to pass String? On Saturday, May 11, 2013 5:56:00 PM UTC-4, Michael Leung wrote: Is it possible to Update a textview from another thread? I got a list item in list view from another fragement. -- Regards, Michael Leung

Re: [android-developers] Re: Update a textview from another thread

2013-05-11 Thread Michael Leung
Ok thanks. Maybe i use subscriber pattern to do that Regards, Michael Leung http://www.itblogs.info On 12/05/2013 8:29 AM, Jonathan S xfsuno...@gmail.com wrote: No. TextView only be updated in the Main Thread. Why not to pass String? On Saturday, May 11, 2013 5:56:00 PM UTC-4, Michael Leung