黑莓按钮不工作在Horizo​​ntalFieldManager

问题描述:

我的工作流是这样的...我采取了三个HoriZontalManager一个用于举行BackgroundImage of the button和两个HoriZontalManager to hold the CustomButton和我添加的主要hfm按钮和背景图像在顶部,然后我在VerticalfieldManager中添加了列表,但我没有得到按钮。工作焦点始终保留在列表字段上。现在当我点击按钮焦点总是位于列表的第一行字段,所以它总是显示我实际上已经在列表字段的第一行实现的选择器。我如何解决它.. 感谢先进..黑莓按钮不工作在Horizo​​ntalFieldManager

请帮助。

+0

请不要在标题中加标签。相反,_be更具体_。 – SLaks

+0

可以使用一些编辑,但你有一些很好的信息,所以+1 :-) –

+0

@乌坦,对不起:-( –

我已经解决了这个问题......我必须检查,如果焦点在按钮上,然后做我的工作,否则列表字段将被调用并解决问题。它适用于触摸屏模拟器以及触控板设备。

protected boolean navigationClick(int status, int time) { 

    //  if the row select do something with it 
    //  for first row which is time 

    if(backCustomButton.isFocus()) { 
     UiApplication.getUiApplication().pushScreen(new saveScreen()); 
    }else if (saveCustomButton.isFocus()) { 
     Dialog.inform("Save Button on focus"); 
    }else 
    if (_list.getSelectedIndex() == 0){ 
// Do the ListSpecific things 
}