画像のオンスクリーン私はドロップダウンメニューからデータを選択した後、データを選択してポップアップした場所に画面に渡す必要があるドロップダウンコードを持つスクリーンをポップアップしています。選択したocf値を最初の画面に渡して消えるはずです。私は、これは、ポップアップ画面ポップアップスクリーンでの問題
ある このコードは、ポップアップ画面を呼び出します 戻って最初の画面にif (field==bitmapField1) {
UiApplication.getUiApplication().pushScreen(new MyPopup());
}
選択後popupscreenを非表示にすることはできませんよとデータを渡すことができないのです
public class MyPopup extends PopupScreen {
ObjectChoiceField ocf;
public MyPopup() {
super(new VerticalFieldManager(), Field.FOCUSABLE);
// this listener 'listens' for any event (see at the bottom)
FieldListener listener = new FieldListener();
TimeZone[] zone = TimeZoneUtilities.getAvailableTimeZones();
ocf = new ObjectChoiceField("Set Timezone", zone);
ocf.setChangeListener(listener);
add(ocf);
}
class FieldListener implements FieldChangeListener {
public void fieldChanged(Field f, int context) {
if (f == ocf) {
Object ob = ocf.getChoice(ocf.getSelectedIndex());
String str = ob.toString();
Dialog.alert(str);
}
}
}
}