我们能否在应用程序/活动启动时显示对话框?
当然可以显示一个对话框,看看这个答案:在Activity.onCreate(..)中显示警报
尝试这个方法,在post execute中从数据库中显示你的数据。在pre execute中开始对话框,在post execute中关闭它。如果你想显示水平递增的进度条,那么在do in background中放置我提供的代码。
private class DownloadImageTask extends AsyncTask {
protected Bitmap doInBackground(String... urls) {
while (myProgress<length){ myProgress=myProgress+1; myProgressBar.setProgress(myProgress); } return decodeImage(urls[0]); } protected void onPostExecute(Bitmap result) { dialog.dismiss(); imView.setImageBitmap(result); } protected void onPreExecute() { // Things to be done while execution of long running operation is in progress. For example updating ProgessDialog dialog = ProgressDialog.show(BusinessCardActivity.this, "Loading.........", "Wait For Few Second", true); } }
http://www.droidnova.com/how-to-create-a-splash-screen,561.html
关于这个问题似乎有很多信息 - 只需谷歌一下。