表单不在设备上显示控件
Form not displaying controls on device
当我运行模拟器上的应用程序时,我分别有图片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)那样在搜索页面显示搜索结果?
谢谢。
Yahya-Imam Munir Kolapo
此问题适用于:
IDE:NetBeans,
桌面 OS: Windows 7,
设备:三星 Galaxy S4
如果服务器对设备不可见,那么您将无法获得可以列出的结果...
当我运行模拟器上的应用程序时,我分别有图片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)那样在搜索页面显示搜索结果?
谢谢。
Yahya-Imam Munir Kolapo
如果服务器对设备不可见,那么您将无法获得可以列出的结果...