黑莓列表中的触发事件

发布于 2024-10-05 02:28:14 字数 36 浏览 0 评论 0原文

我已经在黑莓中实现了一个列表。如何触发列表的“点击”事件?

I have implemented a list in blackberry. How do I fire event 'on click' of the list?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

西瑶 2024-10-12 02:28:14

ListField 有一个可以覆盖的受保护方法,

protected boolean navigationClick(int status, int time).

navigationClick 方法中,您可以使用 getSelectedIndex() 方法获取选定的列表项(行)。

所以你会得到类似这样的东西:

protected boolean navigationClick(int status, int time) {
int sectionIndex = getSelectedIndex();

The ListField has a protected method that you can overwrite,

protected boolean navigationClick(int status, int time).

Within the method navigationClick method you can get the selected list item (row) with the method getSelectedIndex().

So you'll have something such as:

protected boolean navigationClick(int status, int time) {
int sectionIndex = getSelectedIndex();
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文