我是黑莓新手。我们可以在 BlackBerry 中将焦点和单击事件设置为 verticalFieldManager 吗?
这是我的代码:
VerticalFieldManager itemdesc=new VerticalFieldManager(Field.FOCUSABLE);
LabelField pdtitem=new LabelField(pdts.getProducts_name(),LabelField.FOCUSABLE){
protected void drawFocus(Graphics graphics, boolean on)
{
// setSpace(5, 5);
super.drawFocus(graphics, on);
}
protected boolean navigationClick(int status, int time) {
// TODO Auto-generated method stub
UiApplication.getUiApplication().pushScreen(new desc(V,j));
return true;
}
};
itemdesc.add(pdtitem);
Bitmap cartbt=Bitmap.getBitmapResource("cart3.png");
BitmapField cartbtn=new BitmapField(cartbt,Field.FOCUSABLE){
protected void drawFocus(Graphics graphics, boolean on)
{
setSpace(5, 5);
super.drawFocus(graphics, on);
}
protected boolean navigationClick(int status, int time) {
// TODO Auto-generated method stub
PopupScreen pp=new PopupScreen(new login());
Dialog.alert("hai");
UiApplication.getUiApplication().pushScreen(pp);
return super.navigationClick(status, time);
}
};