WebBrowser not showing up on device

30 views
Skip to first unread message

sidiabale

unread,
Jul 14, 2015, 3:25:45 AM7/14/15
to codenameone...@googlegroups.com
Hi,

I made a simple UI containing a webbrowser and two buttons. As advised in other questions, the webbrowser is in the center of a borderlayout and the buttons are in the south. When I run on the simulator, everything works fine. However, on my android device, the webbrowser does not show up (see attachments).

Any idea what's going wrong?

Note: The form was created with the GUI builder and the static html content is predefined in the html field in the form. I also tried storing the text in a local file and loading it in the beforeForm callback but that didn't help.

If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans
Desktop OS: No
Simulator: Yes
Device: Android
WebBrowser_simulator.png
WebBrowser_device.png

Shai Almog

unread,
Jul 14, 2015, 10:29:54 AM7/14/15
to codenameone...@googlegroups.com, sidi...@gmail.com
Hi,
It looks like you nested the hierarchy. If the buttons were indeed truly in the south they would be at the bottom of the form.

sidiabale

unread,
Jul 14, 2015, 11:31:08 AM7/14/15
to codenameone...@googlegroups.com, sidi...@gmail.com
Hi,

You're right: I had a borderlayout in a borderlayout. I've removed the nesting but the problem persists

Shai Almog

unread,
Jul 14, 2015, 11:47:08 PM7/14/15
to codenameone...@googlegroups.com, sidi...@gmail.com
Hi,
what's the exact layout you have now? If it looks the same then the layout is still wrong.

sidiabale

unread,
Jul 15, 2015, 3:24:12 AM7/15/15
to codenameone...@googlegroups.com, sidi...@gmail.com
Hi,

I'm using a borderlayout with the webbrowser in the center and buttons in the south (see new screenshot). It looks the way you'd expect (with buttons at the bottom) but the webbrowser component is still not visible
photo334165786278078444.jpg

Shai Almog

unread,
Jul 15, 2015, 10:29:33 AM7/15/15
to codenameone...@googlegroups.com, sidi...@gmail.com
Hi,
that makes more sense. What's the HTML? Is it 100% valid?
Keep in mind that device browsers are VERY finicky.

sidiabale

unread,
Jul 21, 2015, 6:00:29 AM7/21/15
to codenameone...@googlegroups.com, sidi...@gmail.com
Hi,

The problem was not with the HTML (I had exactly the same with the kitchen sink html content).

I solved it by simply creating a new form with the same layout and contents and now it works! This is of course pretty strange and I wonder if others have had similar experiences. My guess is that something got corrupted in the res file.
Reply all
Reply to author
Forward
0 new messages