问题描述
我编程了一个Android应用程序。而点击一个按钮,它调用一个服务以显示必要的内容。用于调用服务,并在该服务来解析XML数据present花费近5至10秒。在这5秒钟的时间,我需要用文字说明,以显示活动指示器正在加载,请稍候...。本部分适用于iPhone的罚款。但不是在Android系统。
I am programming for an Android application. while clicking a button, it calls a service to display the necessary contents. For calling the service and to parse the XML data present in that service it takes nearly 5 to 10 seconds. In these 5 seconds time period I need to display an activity Indicator with a text stating that "Loading. Please wait...". This part works fine for iPhone. But not in Android.
任何帮助将是AP preciated ..
Any help would be appreciated..
感谢
推荐答案
这。请看创建ProgressDialog一节。尝试解析XML的在AsyncTask的。当您启动任务只显示进度对话框。当任务完成 - 隐藏进度对话框
Check this. Look at "Creating a ProgressDialog" section. Try to parse the XMLs in AsyncTask. When you start the task just show the progress dialog. When the task finishes - hide the progress dialog.
这篇关于Android的活动指示灯的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!