How do we use runOnUiThread in Android?

前端 未结 12 773
太阳男子
太阳男子 2020-11-22 00:09

I\'m new to Android and I\'m trying to use the UI-Thread, so I\'ve written a simple test activity. But I think I\'ve misunderstood something, because on clicking the button

12条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-22 00:42

    runOnUiThread(new Runnable() {
                    public void run() {
                    //Do something on UiThread
                }
            });
    

提交回复
热议问题