【问题标题】:MGWT Scrolling Bug on iPhone iOS7 Cannot reach Bottom of scrollable ContentiPhone iOS7上的MGWT滚动错误无法到达可滚动内容的底部
【发布时间】:2013-11-27 14:03:31
【问题描述】:

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

问题是当我向下滚动时,我无法到达内容的底部,因为它被 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> 

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

我该如何解决?

这些是我的设置:

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

【问题讨论】:

标签: java javascript ios gwt mgwt


【解决方案1】:

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

viewPort.setHeightToDeviceHeight().setWidthToDeviceWidth();

如果内容发生变化,请始终刷新 ScrollPanel。

【讨论】:

    猜你喜欢
    • 2012-09-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-07
    • 2013-05-05
    • 1970-01-01
    • 2019-10-12
    相关资源
    最近更新 更多