Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Mobile: Wrong application height for iPhone/iPod

    SmartGWT mobile.beta, showcase (the current version)

    If I open the showcase by Safari browser with User-Agent=iPad - everything is fine (ipad.jpg)

    If User-agent=iPhone or iPod - the application is rendered incorrectly and it highght becomes more then the visible screen (iphone.jpg).

    The same happened when SmartGWT mobile is deployed to the real device (real.PNG)

    How can I adjust the application to have it rendered correctly?

    Source code is pretty simple:
    Code:
    tabset = new TabSet();
    tabset.addPanel(new Overview());
    tabset.addPanel(new About());
    RootLayoutPanel.get().add(tabset);
    tabset.selectTab(1);
    About and Overview classes are equal to same classes from the showcase.
    Attached Files

    #2
    I figured out the reason of the issue. It is caused by method
    Code:
    com.smartgwt.mobile.client.widgets.Canvas.isStandAlone() /*-{
            return $wnd.navigator.standalone || false;
        }-*/;
    This method does not check that the application may be launched as a part of native application in a browser component. For iOS (UIWebView) navigator.standalone always return false even if the application has full screen of the device. See the attached IMG_0257.jpg
    Attached Files

    Comment


      #3
      We check for UIWebView via the GWT property iOS.agentIsUIWebView so WebView is actually a GWT permutation.

      If you are going to spoof user agent in Chrome, you'll need to remove the word "Safari" from the User-Agent string, as that's the difference GWT uses to determine whether its running in UIWebView vs normal Mobile Safari.

      Comment

      Working...
      X