加載數據我想說明一個紡輪對話,而我的應用程序加載一些數據:顯示紡車對話框,同時在Android
紡車對話框應顯示在點擊一個按鈕。我正在使用下面的代碼,但它現在顯示了轉輪。可能是什麼問題呢?
public void CheckAccount(String username, String password) {
try {
final ProgressDialog progDailog = ProgressDialog.show(this,
"Progress_bar or give anything you want",
"Give message like ....please wait....", true);
new Thread() {
public void run() {
try {
// sleep the thread, whatever time you want.
sleep(1000);
} catch (Exception e) {
}
progDailog.dismiss();
}
}.start();
//getting data code here
//getting data code here
//getting data code here
//getting data code here
//getting data code here
} catch (Exception e) {
Log.e(LOG_TAG, e.getMessage());
PopIt("CheckAccountError", e.getMessage(), "Denied");
}
}
完美的引用,非常感謝@nicholas! :) – Kris 2011-05-28 05:37:42
喜歡使用引用,+1 :) – xorinzor 2012-10-31 21:01:53