LWUIT:布局计算问题
我有一个用 LWUIT 编写的相当大的应用程序。只有少数屏幕出现问题。
问题:
当页面加载时,一切看起来都很好。但是当您滚动时,您无法滚动到底部,并且当您单击列表时,它会选择您单击的位置下面的项目,而不是您单击的位置
但是,当您第二次单击选择列表时,一切都是美好的。另外,当弹出一个对话框时,单击它后,一切都很好。当我忘记调用 show() 或 repaint() 时,他不会绘制任何内容,但是当我尝试滚动时,他会显示()所有内容,并且他会正确计算它。
我真的很困惑这个问题。我现在正在寻找它很长一段时间。我很想在这里获得一些新的见解。
I have a rather large application written with LWUIT. With only a few screens that have the problem.
The problem:
When the page loads, everything looks fine. but when you scroll you can't scroll to the bottom, and when you click on a list it selects the item below where you clicked and not on where you clicked
However, when you click a select the list for a second time, all is fine. Also when a dialog pops up, after clicking it away, all is fine. And when I forget to call show() or repaint() he does not paint anything but when i try to scroll he shows() everything and he calculates it correctly.
I'm really puzzled about this problem. I'm searching on it for a long time now. And I would love to gain some new insights here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过5天的搜索,我终于找到了解决方案。将所有内容添加到表单后,您必须调用 form.show() 。而不是以前,就像我所做的那样。
大多数时候,这两种方式都可以正常工作。只是不总是如此。
After 5 days of searching on it, I finally found the solution. You have to call form.show() after you have added everything to your form. and not before, like I was doing.
Most of the time it works fine in both ways. Just not always.