0
私がシミュレータでアプリケーションを実行すると、それぞれピクチャAとピクチャBがあります。しかし、私が同じことをデバイスで試してみると、検索結果は検索ページに表示されませんでした。より明確にするために、画像CとDを確認してください。 これは私のコードです:フォームがデバイス上にコントロールを表示していない
from=findTextField(c).getText();
to=findTextField1(c).getText();
protected void beforeSelectionPage(Form f) {
ArrayList arr = (ArrayList) response.get("root");
for (Object m:arr){
Map ma = (Map)m;
operatorName =(String) ma.get("OperatorName");
time=(String)ma.get("Time");
size=(String)ma.get("Size");
price=(Double)ma.get("Price");
route=(String)ma.get("Route");
date=(String)ma.get("Date");
Button b = new Button(""+ operatorName);
findContainer2(f).addComponent(b);
b.addActionListener((ActionEvent evt) -> {
showForm("BookingPage",null);
});
findContainer2(f).addComponent(new Label(""+ from));
findContainer2(f).addComponent(new Label(""+ to));
findContainer2(f).addComponent(new Label(""+ price));
f.getComponentForm().revalidate();
}
}
どのように私は、シミュレータ(画像B)のような検索ページの検索結果を表示することができますしてください?
ありがとうございます。
ヤヒヤ・イマームムニールKolapo
この問題は以下に適用されます。 IDE:NetBeansの、 デスクトップOS:Windows 7の、 デバイス:サムスンギャラクシーS4
本当にあなたは応答を得ていますか? ArrayListに項目が含まれていますか?いくつかのロギングを追加し、ddmsを確認することをお勧めします。 – Chen
Chenに感謝します。私の接続のためにサーバーからの応答はないと思います。 RESTfulサービスを公開している可視サーバーに展開する必要があります。 –