黑莓 - 等待屏幕
我正在黑莓java开发中开发一个应用程序。 我请求 http 意味着我正在连接到 Web 服务。Web 服务的响应需要一些时间。当时我想显示一些等待屏幕。
你能告诉我该怎么做吗......
问候 潘卡杰·帕里克
i am developing one application in blackberry java development.
I am requesting to http means i am connecting to web service .response of web service taking some time .That time i want to display some waiting screen.
Could you tell me how can i do that....
Regards
Pankaj Pareek
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
基本上,您需要在后台线程中启动网络请求。
一旦网络操作完成,您应该通知主/UI线程将等待屏幕更改为结果。
要通知主线程,请查看下面的链接并搜索
invokeLater
:http://developers.sun.com/mobility/midp/articles/blackberrydev/< /a>
建议:不要在移动设备上同时生成多个线程。通常它们的最大线程数非常低。
Basically you need to start the network request in a background thread.
Once the network operation is complete you should notify the main/UI thread to change the waiting screen into the results.
To notify the main thread have a look at the link below and search for
invokeLater
:http://developers.sun.com/mobility/midp/articles/blackberrydev/
Word of advice: Don't spawn to many threads at once on mobile devices. Usually they have a really low maximum number of threads.
它已经在这里了:
Stackoverflow - Blackberry - 带动画的加载屏幕
Stackoverflow - Blackberry - 应用程序加载屏幕
It's already here:
Stackoverflow - Blackberry - Loading screen with animation
Stackoverflow - Blackberry - Application loading screen
做一件事....
在按钮的监听器事件中写下这个。
Do one thing....
At the listner event of button write this.
我创建了一个自定义动画位图字段,如下所示:
//thread class
}
call from :
//加载中
I created a custom animated bitmap field, like this:
//thread class
}
call from :
//loading