在Android中,UI更新只能在UI线程中,即主线程。

在子线程中更新UI需要回到UI线程中。有两种教简单的方法如下:

1、

View.Post(() => {  });

View.postDelay(() => {  });

2、

runOnUiThread(() => {  });

 

posted on 2015-11-02 10:47  一株青草儿  阅读(1533)  评论(0)    收藏  举报