开发者

Conflict ListField click & menu click

In my application i have put listfield on the screen. Now my problem is that when i am clicking the list item (while list item has开发者_JAVA百科 the focus on it) it does activities asopen the menu.

I want to disable the menu while clicking list. I want that if i click the list item it should perform only the necessary task defined in the item click event, Not shown the menu with it.

Any body has some idea about about that?


Override the navigationClick() for your ListField to consume the click event (should return true) without calling super.navigationClick():

protected boolean navigationClick(int status, int time) {
    Status.show("Clicked on item: " + myList.getSelectedIndex());
    return true;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜