Form not displaying controls on device

8 views
Skip to first unread message

Yahya-Imam Munir

unread,
Apr 30, 2016, 7:53:09 AM4/30/16
to CodenameOne Discussions
Hi, when I run the app on simulator i have picture A and picture B respectively. But when i tried the same thing on device, the search results were not showing on the search page. Please check picture C and D for more clarification.
This is my code:

        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();                 
        }                               
    } 

Please  how can I display the search results on the search page like that of the simulator (picture B)?

Thank you.
Yahya-Imam Munir Kolapo 




This issue applies to:
IDE: NetBeans
Desktop OS: Windows 7
Device: Samsung Galaxy S4
Pic C and D.JPG
Pic A and B.JPG

Shai Almog

unread,
May 1, 2016, 1:02:38 AM5/1/16
to CodenameOne Discussions
Reply all
Reply to author
Forward
0 new messages