Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TabBarPanel on iPhone in Fullscreen mode #11

Open
StephanBeutel opened this issue Oct 13, 2012 · 4 comments
Open

TabBarPanel on iPhone in Fullscreen mode #11

StephanBeutel opened this issue Oct 13, 2012 · 4 comments

Comments

@StephanBeutel
Copy link

Theres a wrong page height calculation in the TabPanel on iPhone.
I can only tell the problem with iPhone4, but i think on newer devices the problem is there too.

When using TabBar Panel with tabs at the bottom, the Tabs are not visile, because the screen height is higher than the real screen.

To reproduce, just open http://demobile.gwtmobile.com in your iPhone Safari. Then add the site as bookmark to your home screen. Open the site again with the new created icon on your home screen.
Navigate to the TabBar panels and watch the panels with TabBars at the bottom.

Any ideas how to fix the problem?
At the moment I set the page height at startup, but this causes a problem if the device is rotated to landscape mode.

@StephanBeutel
Copy link
Author

I recognized that's the problem occurs with all pages.

It's a problemin the Page.java:

private static void hideAddressBar() {
int barHeight = Utils.isIOS() ? 60 : Utils.isAndroid() ? 1 : 0;
if (barHeight > 0) {
RootLayoutPanel.get().setHeight(Window.getClientHeight() + barHeight + "px");
}
}

Adding 60px to the height of the RootPanel is not necessary (on my iPhone4). It works fine without adding the offset.

@dennisjzh
Copy link
Owner

The hideAddressBar method is to hide the address bar when use gwt moble app
from the browser. 60px is the number I found that will make safari hide
the address bar. I guess 60px is the height of the address
bar. Apparently that also makes the root panel 60px higher that the screen
size. Do you see the address bar in full screen mode when you take out the
offset?

On Sun, Oct 14, 2012 at 9:41 AM, StephanBeutel notifications@github.comwrote:

I recognized that's the problem occurs with all pages.

It's a problemin the Page.java:

private static void hideAddressBar() {
int barHeight = Utils.isIOS() ? 60 : Utils.isAndroid() ? 1 : 0;
if (barHeight > 0) {
RootLayoutPanel.get().setHeight(Window.getClientHeight() + barHeight +
"px");
}
}

Adding 60px to the height of the RootPanel is not necessary (on my
iPhone4). It works fine without adding the offset.


Reply to this email directly or view it on GitHubhttps://github.com//issues/11#issuecomment-9419568.

@StephanBeutel
Copy link
Author

I removed the 60px offset and it works fine. On my iphone the adressbar is is hidden by iOS after loading finished.
In fullscreenmode there's no adressbar available.

@dennisjzh
Copy link
Owner

That is interesting finding. I wonder why I made the 60px change in the
first place. I will take it out. Thanks for letting me know.

On Mon, Oct 15, 2012 at 10:00 AM, StephanBeutel notifications@github.comwrote:

I removed the 60px offset and it works fine. On my iphone the adressbar is
is hidden by iOS after loading finished.
In fullscreenmode there's no adressbar available.


Reply to this email directly or view it on GitHubhttps://github.com//issues/11#issuecomment-9445737.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants