LWUIT滚动跳跃问题 [英] LWUIT scroll jumping issue
问题描述
我需要在表单上显示唯一的组件-HTMLComponent
.垂直滚动滚动条到达表单/组件的底部时,将跳回到表单的顶部.我需要防止这种情况.
I need to show the only component on the form - HTMLComponent
. Reaching the bottom of the form/component while vertical scrolling scroll bar jumps back to the top of the form. I need to prevent this.
我试图打开/关闭窗体和HTMLComponent
上的滚动,但是无论如何,如果有滚动条,它将从底部返回顶部.我也尝试过边框和框布局以及HTMLComponent
的其他容器-没用.
I've tried to turn on/off scrolling on the form and HTMLComponent
but anyway if there's a scroll bar - it will return to the top from the bottom. Also I've tried border and box layouts and additional container for HTMLComponent
- no use.
有什么主意如何防止这种滚动问题?
Any ideas how to prevent such scrolling issue?
推荐答案
尝试一下(它对我有用-LWUIT 1.5):
Try this (it works for me - LWUIT 1.5):
htmlComponent.getComponentForm().setCyclicFocus(false);
如果获得NullPointerException
,请在将HtmlComponent
添加到表单后再调用它.
If you get a NullPointerException
, call it after adding to the HtmlComponent
to a form.
这篇关于LWUIT滚动跳跃问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!