PDA

View Full Version : Viewport size when webpage added to Home Screen



stereoket
22 Sep 2010, 4:20 PM
I just posted a queston on Stack Overflow relating to this:

http://stackoverflow.com/questions/3774530/sencha-fullscreen-panel-that-detects-home-screen-bookmark

I'm new to Ext & Sencha Touch, so i'm on a learning curve.

The issue is that when I create a panel that is full screen - it sits under the search box in the browser as expected, except that when i Add the page to Home Screen, the fullsized panel ignores the status bar at the top and floats underneath it.

http://img.skitch.com/20100923-tb7b4frbkm2eskud44c99brwkc.jpg

Code in my onReady function:


var buttons = [
{text: 'Button'},
{xtype: 'spacer'},
{text: 'Blue', ui: 'action'},
];

var toolbar1 = new Ext.Toolbar({
dock: 'top',
title: 'Panel',
items: buttons
});

var windowHeight = Ext.Element.getViewportHeight();
var windowWidth = Ext.Element.getViewportWidth();

var homePage = new Ext.Panel ({
fullscreen: true,
cls: 'homePage',
dockedItems: [toolbar1],
layout: 'fit',
html: '<h2>Testing Ext.js Panel</h2><p>Height:' + windowHeight +'</p><p> Width:' + windowWidth +'</p>',
animation: 'slide'
});

Is there a way of dealing with this within SenchaTouch, or is it a bug?

jay@moduscreate.com
23 Sep 2010, 4:30 AM
me thinks its a bug. what phone is that on and what version of ST are you using?

stereoket
23 Sep 2010, 4:40 AM
iPhone 3GS (iOS 4.1 8B117)
sencha-touch-beta-0.93

That could be why .. I see the latest release is at 0.95 (I will download the latest version and check again)

stereoket
23 Sep 2010, 5:39 AM
It is fixed in ST 0.95

Also using the fullscreen true option (on iPhone) removes the address bar when the page loads - which is interesting.

Will make sure I keep on top of the updates. Time to carry on learning ST and Ext JS now. Thanks for your help.


iPhone 3GS (iOS 4.1 8B117)
sencha-touch-beta-0.93

That could be why .. I see the latest release is at 0.95 (I will download the latest version and check again)

croudsky
11 Jan 2012, 9:03 PM
I use ST1.1.0

Ext.is.Standalone is "true". but this problem occurs.

Please teach me a personal cure.

thank you.