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");*
*
*
* }*
* });*


Thanks.


On Sunday, May 12, 2013 1:59:15 AM UTC-5, Piren wrote:
>
> 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" <[email protected]> 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 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
>>>> http://www.itblogs.info - My IT Blog
>>>> http://diary.skynovel.info - My Blog
>>>> http://www.michaelleung.info - My Homepage
>>>>  
>>>  -- 
>>> -- 
>>> 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
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Android Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>  
>>>  
>>>
>>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to