listField = new ListField() {
protected boolean invokeAction(int action) {
UiApplication.getUiApplication().invokeLater(new Runnable() {
public void run() {
<** apply your code here **>
}
});
return true;
};
public void focusChangeNotify(int index) {
mainlist = listField.getSelectedIndex();
listField.invalidate();
super.focusChangeNotify(index);
};
protected void onUnfocus() {
mainlistflag = true;
listField.invalidate();
super.onUnfocus();
};
protected void onFocus(int direction) {
mainlistflag = false;
super.onFocus(direction);
};
};