adspace


how to update ui from other thread?

Answer Posted / Santosh Kumar Dixit

To update UI from another thread, you can use a Handler object. Create a Handler in the main UI Thread and pass it to the worker thread. The worker thread can then use the Handler's sendMessage() or post() method to send a message containing the data that needs to be updated on the UI thread. In the handleMessage() method of the Handler, update the UI.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is the latest version of android os?

1044


What all devices have you worked on?

1058


Which is the latest version of android?

1085


What did you like better, ice cream sandwich or kitkat?

977