Reputation: 551
I want to display two webbrowsers on one screen, the first show an URL and the second show a custom banner. I tried with a table layout to display two rows, and set the weight on 80% for the first and 20% for the second. But when I run the app only the first shows up, and cover 100% of the height
Is this possible?
Upvotes: 0
Views: 45
Reputation: 1907
Please check this codes it should solve
protected void beforePage(Form f) {
f.setScrollableY(false);
TableLayout.Constraint c1 = new TableLayout.Constraint();
c1.setHeightPercentage(80);
c1.setWidthPercentage(100);
TableLayout.Constraint c2 = new TableLayout.Constraint();
c2.setHeightPercentage(20);
c2.setWidthPercentage(100);
WebBrowser browser = new WebBrowser();
browser.setURL("http://www.facebook.com");
WebBrowser browser2 = new WebBrowser();
browser2.setURL("http://www.google.com");
f.setLayout(new TableLayout(2, 1));
f.addComponent(c1, browser);
f.addComponent(c2, browser2);
}
Upvotes: 2
Reputation: 1907
yes its possible
I hope it will help
Upvotes: 1