4/21/2015

[Android] 處理 Can't create handler inside thread that has not called Looper.prepare()


因為 UI 操作不能在其它 thread 做
直接用 activity 提供的 runOnUiThread 做掉

runOnUiThread(new Runnable(){ public void run(){ 
    //原本會報錯的ui操作
});

1 則留言: