在使用codeNAME一(布局管理)两大化网页浏览器 [英] Using two WebBrowsers on codename one (layout management)

查看:270
本文介绍了在使用codeNAME一(布局管理)两大化网页浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要显示在一个屏幕上的两个化网页浏览器,首秀的URL和第二场演出的自定义旗帜。
我用表布局试图显示两行,并设置重量上的80%的第一和20%的第二个。但是,当我运行的应用程序只有先显示出来,并覆盖高度的100%

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

这是我想要的:

这可能吗?

推荐答案

请检查该codeS
它应该解决

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

这篇关于在使用codeNAME一(布局管理)两大化网页浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆