Reputation: 957
how to open the selected list field in blackberry?
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());
}
Upvotes: 2
Views: 731
Reputation: 8611
override navigationclick method in the screen , and on click, call listNames.getSelectedIndex();
Upvotes: 1
Reputation: 4942
you can override navigationClick(int status, int time)
method in the class where you have added the ListField...
protected boolean navigationClick(int status, int time) {
if(field.getSelectedIndex());
return true;
}
Upvotes: 1