adspace
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