开发者

Blackberry ObjectListField on click

How to get selected row from blackberry objectlistfield, when user clicks on list it开发者_StackOverflow中文版em?


getSelectedIndex()

You will also have to set the setChangeListener() and implement the corresponding methods like fieldChanged() and keyDown()

have you read the documentation before asking ? Do you have a more specific question ?


public boolean navigationClick(int status, int time) {
    Field focus = list.getLeafFieldWithFocus();
    Dialog.alert("Focus String :: " + focus.getIndex());

    if (focus instanceof ListField) {
        ListField listField = (ListField)focus;

        Dialog.alert("Selected Index"+listField.getSelectedIndex());
        Dialog.alert("Selected List Value"+listField.getCallback().get(listField,
            listField.getSelectedIndex()).toString());
    }
    return true;
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜