midlet 命令上的触摸事件
我正在为诺基亚创建触摸设备应用程序。
J2ME 在画布上提供了pointerPressed
、released
和dragged
方法。
我已经在全屏模式下生成了一个带有命令的画布。
单击“选项”命令时,会打开另一个命令菜单,其中包含“确定”、“后退”、“下一步”等命令。
现在要获取子命令菜单的事件,我必须获取单击了哪个命令。
我的问题是如何获得已单击的特定命令?
应用程序适用于 N97/Musicexpress(不支持键盘)。我只是想要使用触摸功能的出路。keyPressed
事件对我来说根本没有用。
I am creating application for touch devices for nokia.
J2ME provides methods pointerPressed
, released
and dragged
on canvas.
I have generated a canvas in full screen mode having commands.
On click of "option" command, another command menu opens, which is having commands like Ok, Back, Next.
Now to get the event of sub command menu I have to get that which command is clicked.
My question is how can I get that particular command has been clicked?
Application is for N97/Music express (no keyboard support). I just want the way out using touch functionality.keyPressed
event is not at all useful for me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您有指针事件,请查看该事件的坐标,并检查它是否位于您在画布上绘制菜单选项的位置内。
If you have pointer events, then look at the co-ordinates of the event, and check to see whether it lies within where you're drawing your menu option on the canvas.