我目前正在爲Asxx手機制作應用程序,包括3xx系列和新的5xx系列手機。PopupChoiceGroup actionlistener無法在Asha 501上工作
我已經工作的3XX系列如阿莎310和311,但由於某些原因,當我編譯和嘗試上阿莎501個電話代碼,它不工作..
我「收音機1點擊!!!」消息在Asha 310的仿真器控制檯上,但不在Asha 501上。
我對Asha 310/311和Nokia Asha SDK 1.1使用Nokia Java SDK 2.0 for Asha 501手機和適當的Asha LWUIT庫進入SDKs內部。
有沒有人有一個想法,爲什麼它在舊的阿莎手機,但不是新的?
Form form = new Form("Testing form");
RadioButton choices[] = new RadioButton[2];
RadioButton radioButton1 = new RadioButton("Radio 1");
RadioButton radioButton2 = new RadioButton("Radio 2");
choices[0] = radioButton1;
choices[1] = radioButton2;
PopupChoiceGroup popupChoiceGroup = new PopupChoiceGroup("Testing", choices);
radioButton1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
System.out.println("Radio 1 clicked!!!");
}
});
radioButton2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
System.out.println("Radio 2 clicked!!!");
}
});
form.addComponent(popupChoiceGroup);
form.show();
編輯:我使用手機模擬器,所以我可以看到輸出。
你不能這樣測試。手機沒有可見的控制檯。 System.out.println將永遠不會在任何JavaME手機上顯示。爲了正確測試,你應該在你的表單中創建一個文本字段,然後在其中放置文本。 –
我正在使用手機模擬器..正如我所提到的,我正在310模擬器的控制檯上獲取文本,但不是在501模擬器的控制檯上。並且在你問之前,是的,我正在501模擬器上獲得其他文本,只是不是這個.. – Pat
Asha SDK組件是非常非常錯誤的( – ADK