我是 BB 开发的初学者。我创建了一个 CustomListField,当我单击一行时,该行的背景颜色必须更改并且必须显示一个新屏幕(完成!)。
任何人都可以帮我完成这项工作吗?谢谢
下面是代码:
protected boolean navigationClick(int status, int time)
{Field field = this.getLeafFieldWithFocus();
if(field instanceof ListField)
{
// listValues is String[] where you store your list elements.
// listField is the ListField instance you are using
UiApplication.getUiApplication().pushScreen(new ReadMsgScreen());
int index= getIndex();
if(index== this.getSelectedIndex())
{
**// I think the code to change the row's background color must be set here!**
}
return true;
}
return super.navigationClick(status, time);
}