Is there an example to show HTML-pages in an app? (without looking like in the browser)

20 views
Skip to first unread message

Daniel

unread,
Oct 3, 2017, 7:12:52 AM10/3/17
to CodenameOne Discussions

Hi there,

I need a simple example to show own html-pages in a container or as Component (without Scrollbars on the sides like see screenshot).

I use the following snippet:..


...
BrowserComponent wb = new BrowserComponent();
wb
.setURL("jar:///sample.html");

Container con = new Container(new BoxLayout(BoxLayout.Y_AXIS));
con
.setScrollableY(true);
con
.addComponent(wb);
...


and I get this strechted result:




I would use the html-pages like a default Container with Labels and so on.
Later I would try to modify this pages by tag-id's. Is there an example or hints?

Can anybody help me?



Shai Almog

unread,
Oct 4, 2017, 12:09:39 AM10/4/17
to CodenameOne Discussions
Hi,
the scrollbars are a feature of the desktop browser in the simulator and will behave differently on the device.
We don't have much samples of this as we don't recommend this sort of architecture. It's inferior to what you can accomplish with Codename One components.
Reply all
Reply to author
Forward
0 new messages