BrowserField2 的 Blackberry 简单进度条
在我的应用程序中,我有一个 BrowserField2 加载不同的页面,我想显示一个简单的旋转进度条/指示器。尽可能简单,没有百分比等 - 只是一个小动画来向用户表明正在发生某些事情。
我来自 Android 开发,那里有一个叫做 Progressbar 的东西,尽管对于 Blackberry 来说它可能被称为完全不同的东西? (黑莓的进度条似乎总是包括计算所取得的进度)。
我应该寻找什么?
In my app I have a BrowserField2 loading different pages and I want to show a simple spinning progressbar/indicator. As simple as possible really, without percent etc. - just a small animation to indicate to the user that something is happening.
I come from Android development and there such a thing is called Progressbar, though for Blackberry it maybe is called something completely different? (Progressbar for Blackberry seems to always include calculating the progress made).
What should I be looking for?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我以一种相当非正统的方式解决了这个问题,我可能不会推荐任何人,但无论如何我都会写它,因为也许它会帮助那些急于完成它的人。请记住,这是一种不好的做法。
我的应用程序基本上由 4 个按钮和一个浏览器字段组成。
要显示旋转的“加载动画”,我使用由 browserfieldlistener 触发的自定义 PopupScreen 的 alishaik786 提示(请参阅他的评论):
然后在我的自定义 PopupScreen 中,我通过检查来检查用户在“protected boolean touchEvent(TouchEvent event)”中单击的位置event.getGlobalY() &触摸的 event.getGlobalX() 并将其与按钮的位置进行比较。如果用户在按钮的 X 和 Y 范围内按下,则弹出屏幕将关闭,并且我会触发按下按钮。
正如我所说,这是一种不好的方法(很多事情需要静态),但如果您想要一个快速而肮脏的解决方案,它就可以工作。
I solved it in a rather unorthodox way, something I probably wouldn't recommend ANYONE but I'll write it anyway since maybe it will help someone who's in a hurry to get it done. Just remember this is a bad way of doing it.
My app basically consists of 4 buttons and a browserfield.
To display a spinning "load animation" I use alishaik786's tip (see his comments) of the custom PopupScreen triggered by a browserfieldlistener:
Then in my custom PopupScreen I check where the user is clicking in "protected boolean touchEvent(TouchEvent event)" by checking event.getGlobalY() & event.getGlobalX() of the touch and comparing it to the positions of the buttons. If the user presses within the X&Y of a button then the popup screen is closed and I trigger the button being pressed.
As I said this is a bad way of doing it (many things need to be static), but it works if you want a quick and dirty sollution.