Pregunta

I use GWT 2.5.1 and the MGWT 1.2-Snapshot on a mobile web app on iOS7.

The problem is that when I scroll down I cannot reach the bottom of the content because it is hidden by the iOS7 Safari bottom status line. I see it working in the showcase example for MGWT, but could not figure out my problem.

Here is what I use in UiBinder:

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

As you can see in the following screenshot you cannot see the bottom of the content. The scroll bar position indicator is also not visible anymore at some position.

enter image description here

enter image description here How can I fix that?

These are my settings:

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

It seems to work if I do not use this:

viewPort.setHeightToDeviceHeight().setWidthToDeviceWidth();
¿Fue útil?

Solución

Here is the solution. Do not use this line:

viewPort.setHeightToDeviceHeight().setWidthToDeviceWidth();

And always refresh a ScrollPanel if the content changes.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top