进度条没有立即显示
单击活动类中的提交按钮后,我将向服务器发送投诉。这是我的代码,用于在投诉发送到服务器时显示进度条。但点击提交后并没有立即显示。它在从服务器获取响应之前显示进度条。
case R.id.submit:
ProgressDialog.show(this, " " , " Sending Complaint. \n Please wait ... ", true);
/*...code to send complaint and get the response....*/
请帮我
I'am sending a complaint to server after clicking on submit button from my activity class. And Here is my code to display a progress bar while the complaint is sending to server. But it is not displaying immediately after clicking on submit. It is displaying the progress bar just before getting the response from server.
case R.id.submit:
ProgressDialog.show(this, " " , " Sending Complaint. \n Please wait ... ", true);
/*...code to send complaint and get the response....*/
Please help me
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的服务器通信是在单独的线程中进行的,而不是在您当前正在执行的 UI 线程中进行的。
do your server communication in the separate thread not in the UI thread which you are doing currently..