How to update UI from other threads? Note : Other thread means other than main thread.
It is not possible for other threads to manipulate UI.
They can hold lock on that UI control, and manipulate. Holding lock is to make sure others are not touching it.
Request Main Thread through inter thread communication using Handlers or runOnUiThread() function, and manipulate ui
Keep the UI control which has to be shared, in a shared memory, and let all the threads manipulate it.
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.
Back To Top