大家好,我遇到了一个问题。我已经实现了ListField
一个屏幕。在屏幕顶部,我用一个HorizontalFieldManager
来握住TitleLabel and Two Butons
. 我已经在列表字段的所有行上推送了一些屏幕。我的问题是,让假设当我在第 4 行并且我选择了我想要的内容然后当我单击按钮时,按钮工作但我在第 4 行实现的屏幕也出现了如何避免它。我在 Storm 9550 模拟器上测试它并使用 Blackberry eclipse plugin5.0 。我没有主意了,请帮帮我。
导航点击是这样的
protected boolean navigationClick(int status, int time) {
selectListAndButton();
return true;
}
//这里是selectListAndButton方法
private selectListAndButton(){
Field field = getFieldWithFocus().getLeafFieldWithFocus();
if(field == backCustomButton){
//Popped the active Screen
}else if(field == saveCustomButton){
//Saving some Data to the Database And pushing another Screen here
// problem comes here if i am at 2nd row of the listfield and selects
something from there and clicked on the button the screen which was
implemented at 2nd row also appears
}
else if (_list.getSelectedIndex() == 0){
//Called a date picker
}
else if (_list.getSelectedIndex() == 1){
//Pushed some another screen
}
else if (_list.getSelectedIndex() == ){
//Pushed some another screen
}