在 sl4a 中使用 addContextMenuItem
如何在 sl4a 中使用 addContextMenuItem ?
我使用实验性全屏 UI 来显示列表视图。我想要:
1) 长按列表中的某个项目
2)显示与该项目相关的选项的“弹出”菜单。
列表视图部分工作正常。
我知道如何执行 2) 一旦收到事件(只需显示警报并添加项目),但我无法看到哪些用户操作实际触发了您定义的事件,或者如何控制它。
例如,什么会触发下面定义的“Play”事件,以及我如何控制什么?
droid.addContextMenuItem("Play", "contextmenu", "test")
How do you use addContextMenuItem in sl4a?
I'm using the experimental full-screen UI to display a list view. I want to:
1) trap a long-press on an item on the list
2) show a "pop-up" menu of options relating to that item.
The listview part works fine.
I know how I can do 2) once I get an event (simply display an alert and add items) but I can't see what user action actually triggers the event you define, or how to control it.
E.g. what will fire the "Play" event defined below, and how do I control what does?
droid.addContextMenuItem("Play", "contextmenu", "test")
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论