When building "Windows Desktop Build" using a BrowserComponent in full 
screen mode is not working. The window sizes at first is full screen and 
then when app is fully loaded it resizes to smaller than the full screen.

This behavior happens on screens that are 1920 x 1080.

Build Hint: desktop.fullScreen = true

See attached minimized code so you can see the issue.


-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/ce9e16a2-bce7-4dcd-a1f3-5969eada640c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
package com.cn1test;

import com.codename1.io.Log;
import static com.codename1.ui.CN.*;
import com.codename1.ui.Dialog;
import com.codename1.ui.Form;
import com.codename1.ui.Toolbar;
import com.codename1.ui.plaf.UIManager;
import com.codename1.ui.util.Resources;

/**
 * This file was generated by <a href="https://www.codenameone.com/";>Codename
 * One</a> for the purpose of building native mobile applications using Java.
 */
public class MyApplication
{

    private Form current;
    private Resources theme;

    public void init(Object context)
    {
        // use two network threads instead of one
        updateNetworkThreadCount(2);

        theme = UIManager.initFirstTheme("/theme");

        // Enable Toolbar on all Forms by default
        Toolbar.setGlobalToolbar(true);

        // Pro only feature
        Log.bindCrashProtection(true);
    }

    public void start()
    {
        if (current != null)
        {
            current.show();
        }
        else
        {
            BrowserForm browserForm = new BrowserForm();

            current = browserForm;
            browserForm.show();

            browserForm.setPage("<html><body>HELLO WORLD</body><html>");
        }
    }

    public void stop()
    {
        current = getCurrentForm();
        if (current instanceof Dialog)
        {
            ((Dialog) current).dispose();
            current = getCurrentForm();
        }
    }

    public void destroy()
    {
    }
}
package com.cn1test;

import com.codename1.ui.BrowserComponent;
import com.codename1.ui.Form;
import com.codename1.ui.layouts.BorderLayout;

public class BrowserForm extends Form
{
    protected BrowserComponent browser;
    
    public BrowserForm()
    {
        super(new BorderLayout());

        setUIID("Browser");
        getContentPane().setUIID("Container");
        getToolbar().setUIID("Container");
        browser = new BrowserComponent();
        add(BorderLayout.CENTER, browser);
    }

    public void setPage(String page)
    {
        browser.setPage(page, null);
    }

    public void setPage(String page, String baseUrl)
    {
        browser.setPage(page, baseUrl);
    }

    public void setURL(String url)
    {
        browser.setURL(url);
    }
}

Reply via email to