开发者

Conflict ListField click & menu click

开发者 https://www.devze.com 2023-03-05 10:00 出处:网络
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.

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

精彩评论

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