PDA

View Full Version : Orientation change in ChildBrowser doesn't repaint app



dholth
12 Dec 2011, 1:35 PM
I'm using PhoneGap's ChildBrowser plugin and Touch 1.x to open a .pdf on iPad without really leaving my app. When the user changes orientation and presses 'done', returning to the app, the app does not repaint itself.

How do I convince the app to repaint itself with its new size? Can I just send a simulated 'orientationchange' event? Ext.repaint(); and Panel.doLayout(); have not worked.

mitchellsimoens
13 Dec 2011, 8:17 AM
Does the orientation events fire?

dholth
13 Dec 2011, 8:34 AM
The orientation event does not fire. I solved the problem by setting
window.plugins.childBrowser.onClose = function() {
viewport.setSize(window.innerWidth, window.innerHeight);
}; (this function is called when the user returns from the child browser).

dholth
13 Dec 2011, 10:15 AM
I may have spoke too soon. Sometimes this works, sometimes it doesn't.