【发布时间】:2014-01-23 10:54:04
【问题描述】:
我正在使用 AsyncTask ProgressDialog 来显示一些消息。在处理时它有一个图像而不是旋转的圆圈。我在 onPreExecute 中将其设置为:-
Drawable myIconStart = getResources().getDrawable(R.drawable.imagestart);
this.dialog.setIndeterminate(true);
this.dialog.setIndeterminateDrawable(myIconStart);
this.dialog.setMessage("Processing… please wait for confirmation");
现在工作完成后,在 onPostExecute 中,我设置为:-
Drawable myIconDone = getResources().getDrawable(R.drawable.imagedone);
this.dialog.setIndeterminate(true);
this.dialog.setIndeterminateDrawable(myIconDone);
this.dialog.setMessage("Your Reservation has been confirmed");
但是,未设置 onPostExecute 的第二张图片。第一个图像出现然后消失,第二个图像显示为空白。你能告诉我我做错了什么/我应该做什么吗?
【问题讨论】:
-
客户要求已经改变,现在我必须先显示一个处理微调器,然后在执行后我必须显示第二个图像
-
由于时间限制,我只是按照laalto的建议进行。但仍然不明白为什么会这样。
标签: android android-asynctask progressdialog