我是Android開發新手,並且正在努力解決這個一直給我帶來一些挫折的問題。我正試圖關閉這個進度Dialog。當我運行該應用程序時,它顯示,信息被提取,並且UI被更新。但是,對話從來沒有被駁回。ProgressDialog不會在線程中解僱
progDialog = ProgressDialog.show(HomeActivity.this, "", "Fetching info...", true, false);
new Thread(new Runnable() {
public void run() {
fetchInfomation(userID); //fetches information - Works
runOnUiThread(new Runnable() {
public void run() {
setLayoutList(); //updates UI - Works
progDialog.dismiss(); //doesn't seem to close progress dialog
firstView(); //displays prompt - Works
}
});
progDialog.dismiss(); //doesn't close dialog either
}
}).start();
任何想法?
閱讀此:http://stackoverflow.com/q/891451/696723。你會從中得到一些想法 – CMA 2012-07-23 03:35:21