In android, why the user interface cannot be updated from the user interface thread?

I know that we need to update the interface in the main thread, and if we want to update the interface in another thread, we can use the handler, blablabla ...

But why? Maybe this has something to do with resource competition?

Any help would be appreciated.

+3
source share
3 answers

This is not only in Android. Basically, in each structure, gui ui can only be updated from the ui thread. For more information, Why are user interface elements always created / updated from the user interface stream?

+7
source

. , , . .

+5

Android UI . , , , , .

+1

All Articles