Difference between the main thread and UI thread

前端 未结 5 1662
醉梦人生
醉梦人生 2020-12-12 15:20

I\'m given to understand that both are the same. But I recently(a bit late to the party) came across android support annotations . The note in the same reads

5条回答
  •  一向
    一向 (楼主)
    2020-12-12 15:31

    When an application is launched, the system creates a thread of execution for the application, called "main." This thread is very important because it is in charge of dispatching events to the appropriate user interface widgets, including drawing events. It is also the thread in which your application interacts with components from the Android UI toolkit (components from the android.widget and android.view packages). As such, the main thread is also sometimes called the UI thread.

    Read this tutorial Documents. https://developer.android.com/guide/components/processes-and-threads.html#Threads

提交回复
热议问题