对于下面显示的代码,当我按下Options选项按钮(由optionsButton变量给出)时,没有出现弹出屏幕。我做错了什么?
optionsButton.setChangeListener(new FieldChangeListener() {
public void fieldChanged(Field arg0, int arg1) {
PopupScreen popup = new PopupScreen(new VerticalFieldManager());
popup.add(new LabelField("Hello!"));
Border border = BorderFactory.createSimpleBorder(
new XYEdges(), Border.STYLE_TRANSPARENT);
popup.setBorder(border);
}
});
答案 0 :(得分:8)
optionsButton.setChangeListener(new FieldChangeListener() {
public void fieldChanged(Field arg0, int arg1) {
PopupScreen popup = new PopupScreen(new VerticalFieldManager());
popup.add(new LabelField("Hello!"));
Border border = BorderFactory.createSimpleBorder(
new XYEdges(), Border.STYLE_TRANSPARENT);
popup.setBorder(border);
Uiapplication.getUIapplication.pushScreen(popup);
}
});