2
如何打開黑莓中的選定列表字段?BlackBerry ListField - 如何打開選定的列表項
listNames = new Vector();
field = new ListField();
ListCallBack _callback = new ListCallBack();
field.setCallback(_callback);
add(field);
intialseList();
}
private void intialseList() {
String name = "Sriaknth";
String name2 = "pradeep";
listNames.addElement(name);
listNames.addElement(name2);
reloadList();
}
private void reloadList() {
field.setSize(listNames.size());
}
它應該是'field.getSelectedIndex()'而不是'listNames.getSelectedIndex();' – BBdev