可能重複:
Download a file with Android, and showing the progress in a ProgressDialog
Android Activity Indicator?機器人加載消息
我真的在android系統 我做一個web服務(XML)連接的應用程序是新手,它的工作原理不錯,但我的應用程序加載視圖不完整的屏幕,然後顯示數據。 當所有數據從服務器上下載並顯示出來時,我想要實現「準備就緒」對話框。
感謝您的幫助
可能重複:
Download a file with Android, and showing the progress in a ProgressDialog
Android Activity Indicator?機器人加載消息
我真的在android系統 我做一個web服務(XML)連接的應用程序是新手,它的工作原理不錯,但我的應用程序加載視圖不完整的屏幕,然後顯示數據。 當所有數據從服務器上下載並顯示出來時,我想要實現「準備就緒」對話框。
感謝您的幫助
從http://developer.android.com/guide/topics/ui/dialogs.html#ProgressDialog
ProgressDialog progressDialog= ProgressDialog.show(MyActivity.this, "",
"Loading. Please wait...", true);
progressDialog.dismiss(); // for close the dialog bar.
偉人.. 你知道如何保持進度對話2秒嗎? – funkeeiads
@funkeeiads讓線程睡眠2000毫秒 – Ahmad
使用的AsyncTask用於顯示進度條和第一次下載從服務器的數據,那麼所以它沒有凍結的不完整的觀點UI和渲染 –
看到這些:HTTP:/ /stackoverflow.com/questions/5025652/android-activity-indicator,http://stackoverflow.com/questions/10085227/android-show-progress-indicator-of-parse-while-downloading-a-xml和http:/ /stackoverflow.com/questions/6302479/android-activity-indicator。 –