Update the UI outside the main thread

后端 未结 5 1156
梦谈多话
梦谈多话 2021-01-17 01:21

I am totaly new to android and just want to know if it is any working and possible way to update the UI outside the main thread. Just from my code I have listed below I know

5条回答
  •  情话喂你
    2021-01-17 01:44

    Use activity.runOnUiThread

    Acivity.runOnUiThread(new Runnable() {
        public void run() {
            //something here
        }
    });
    

提交回复
热议问题