BlackBerry WebWorks 应用程序滚动
我构建了一个动态加载数据并显示数据的应用程序。在模拟器(Torch 9800,v.6)上一切都很好,但在真实设备上(与模拟器相同),我遇到了一个非常奇怪的滚动问题 - 应用程序中的滚动缓慢且跳跃。后面没有 JS 或一些线程在运行,所以滚动应该没问题。滚动条本身是通过简单的 overflow-y:scroll
来完成的。
I built an app which loads data dynamically and displays it. On the simulator (Torch 9800, v.6) everything is fine, but on the real device, (same as the simulator), I have a very strange scrolling problem - the scrolling in the app is slow and jumpy. There is no JS or some thread running in the back, so scrolling should be fine. The scroller itself I accomplish by simple overflow-y:scroll
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这就是我解决这个问题的方法,因为您使用的是 html 而不是 jQuery-mobile,我相信您可以“翻译”代码以适合您选择的语言。
对于使用 jQuery-mobile 的黑莓 Os5、Os6 和 Os7,我删除了需要输入日期、文本等的页眉和页脚的属性“数据位置:固定”,并应用了此样式:
对于既不需要也不需要向上滚动的页面和向下或输入字段,我仍然应用了相同的样式,但在动态注入的 html 中添加了以下属性(您对具有虚拟 qwerty 键盘的黑莓智能手机执行相同的操作):
要将其转换为这些属性的标准 css,您可以查看在任何jquery-mobile.css 文件。
http://code.jquery.com/mobile/1.2 .0/jquery.mobile-1.2.0.css 并查找应用于
.ui-header-fixed .ui-footer-fixed
的样式。就我而言,这些应用程序不像 iOS 和 Android 版本那么流畅,但至少不像没有解决方法那样跳跃或缓慢。
This is how I solved it, since you are using html and not jQuery-mobile, I am sure you can "translate" the code to suit your language of choice.
For blackberry Os5, Os6 and Os7 using jQuery-mobile I removed the attribute "data-position: fixed" for headers and footers in pages that required inputting dates, text, e.t.c. and applied this styling:
for pages that did not neither require scrolling up and down nor inputting fields, I still applied the same styling but added the following attributes in the dynamically injected html (you do the same for blackberry smartphones that have a virtual qwerty keyboard):
To translate this to standard css for these properties you can look at any jquery-mobile.css file.
http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.css and look for the styling applied to
.ui-header-fixed .ui-footer-fixed
for example.In my case the apps were not as smooth as the iOS and android versions but at least not as jumpy nor as slow as without the workaround.