How to update UI from other threads? Note : Other thread means other than main thread.

Answer:  Request Main Thread through inter thread communication using Handlers or runOnUiThread() function, and manipulate ui

Description: All UI controls or views will be under control of Main thread (UI thread). If other thread wants to touch UI, it is possible through one of the inter thread communication, that is through handlers or through runOnUiThread() function or through asynctask.

 

No comments:

Post a Comment