iPhone iOS7上的MGWT滚动错误无法达到可滚动内容的底部

时间:2013-11-27 14:03:32

标签: java javascript ios gwt mgwt

我在iOS7上的移动网络应用上使用GWT 2.5.1和MGWT 1.2快照。

问题在于,当我向下滚动时,我无法到达内容的底部,因为它被iOS7 Safari底部状态行隐藏。我看到它在MGWT的展示示例中工作,但无法弄清楚我的问题。

以下是我在UiBinder中使用的内容:

<mgwt:LayoutPanel>  
<mgwt:ScrollPanel scrollingEnabledX="false" scrollingEnabledY="true">
<mgwt:RoundPanel>
    <g:HTMLPanel>
    very long text
    </g:HTMLPanel>
</mgwt:RoundPanel>
</mgwt:ScrollPanel>
</mgwt:LayoutPanel> 

正如您在下面的屏幕截图中看到的,您无法看到内容的底部。滚动条位置指示器在某个位置也不再可见。

enter image description here

enter image description here 我该如何解决?

这些是我的设置:

    ViewPort viewPort = new MGWTSettings.ViewPort();
    viewPort.setTargetDensity(DENSITY.MEDIUM);
    viewPort.setUserScaleAble(false).setMinimumScale(1.0).setMinimumScale(1.0).setMaximumScale(1.0);
    viewPort.setHeightToDeviceHeight().setWidthToDeviceWidth();
    MGWTSettings settings = new MGWTSettings();
    settings.setViewPort(viewPort);
    settings.setIconUrl("apple-touch-icon.png");
    settings.setAddGlosToIcon(true);
    settings.setFullscreen(true);
    settings.setPreventScrolling(true);
    MGWT.applySettings(settings);

如果我不使用它似乎有效:

viewPort.setHeightToDeviceHeight().setWidthToDeviceWidth();

1 个答案:

答案 0 :(得分:0)

这是解决方案。不要使用这一行:

viewPort.setHeightToDeviceHeight().setWidthToDeviceWidth();

如果内容发生变化,请务必刷新ScrollPanel。