Difference between UI Thread and Worker Thread in Android?

前端 未结 2 1118
时光取名叫无心
时光取名叫无心 2020-12-28 14:45

I have read documents about Thread on Android, but I could not find differences between UI thread and Worker Thread. Can someone just give me more example about it?

2条回答
  •  醉话见心
    2020-12-28 15:20

    The Ui thread is the thread that makes any changes required for the ui.

    A worker thread is just another thread where you can do processing that you dont want to interupt any changes happening on the ui thread

    If you are doing large amounts of processing on the ui thread while a change to the ui is happening the ui will freeze until what ever you have running complete.

提交回复
热议问题