What is the Android UiThread (UI thread)

前端 未结 3 1933
耶瑟儿~
耶瑟儿~ 2020-11-22 09:26

Can someone explain to me what exactly the UI thread is? On developer.android.com it says about the runOnUiThread function

public final void runOnUiTh

3条回答
  •  旧巷少年郎
    2020-11-22 09:43

    All UI drawings etc. happen in a separate thread. Its called the UIThread. If you want to make any change to UI u must use make sure it happens in UIThread's context. Easiest way of doing it is to make use of runOnUiThread

提交回复
热议问题