how to update ui from other thread?



how to update ui from other thread?..

Answer / 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

More Android OS Interview Questions

Which are the different tags that are required to create reusable user interface that include the layout?

1 Answers  


Can I write code for android using c/c++?

1 Answers  


What is a Dalvik ?

1 Answers  


What is .dex extension?

1 Answers  


Explain the difference between service & intent service?

1 Answers  


What is android ndk?

1 Answers  


Is jelly bean a version of android os?

1 Answers  


What is a portable wi-fi hotspot?

1 Answers  


What is assets folder in android?

1 Answers  


How does auto sync work on android?

1 Answers  


Explain implicit and explicit intents.

1 Answers  


What main/assets/ directory contains?

1 Answers  


Categories