LWUIT 触觉设备问题
我需要捕获当您单击屏幕上的列表时应用程序引发的事件。当我单击屏幕时,actionPerformeed(ActionEvent e)
返回-1
,我认为它是默认事件。
在非触摸设备中,按下中央按钮启动的事件是 Canvas.FIRE,为什么在触摸设备中不行呢?
我怎样才能做到这一点?
I need to capture the event that an app throws when you click on the screen, on a list. When I click on the screen, actionPerformeed(ActionEvent e)
returns -1
, I suppose that it is the default event.
In non-touch devices, the launched event by pressing the central button is Canvas.FIRE
, why not in tactile devices?
How can I do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
actionEvent 源参数将来自列表。操作事件旨在封装操作的触发器(例如按键/触摸),因为这是不相关的。无需区分触发器,因为您始终可以提取列表所选项目并使用它。
在某些用例中,人们想知道单元格渲染器内触摸的位置,但这是与问题无关的特殊情况。
The actionEvent source argument will be from the list. Action events are designed to encapsulate the trigger for the action (e.g. key/touch) since that is irrelevant. There is no need to distinguish the trigger since you can always extract the lists selected item and use that.
There are use cases where one would like to know the location touched within the cell renderer but that is a special case unrelated to the question.