1 Attachment(s)
PhoneGap [0.9.2] and Sencha Touch [1.0.1]
Hi every body!
First of all, sorry for my bad english, I speak French.
I recently discover PhoneGap and Sencha, I would try this technology in order to check if in the future we can use this in our projects. I easily setup the Kichen Sink Demo in PhoneGap. Everything work great except for Orientation Change. I read on this forum and somes other and maybe I don't understand but i always see a error in result.
After the orientation change, the list is store only at the left of the screen and after i touch the screen, the list go up at the middle of the screen... I add a screenshot of the result!
There is the code I use and the result I receive!
HTML Code:
// If you want to prevent dragging, uncomment this section
function preventBehavior(e)
{
e.preventDefault();
};
document.addEventListener("touchmove", preventBehavior, false);
function onBodyLoad()
{
document.addEventListener("deviceready",onDeviceReady,false);
}
/* When this function is called, PhoneGap has been initialized and is ready to roll */
function onDeviceReady()
{
Ext.setup({
tabletStartupScreen: 'resources/img/tablet_startup.png',
phoneStartupScreen: 'resources/img/phone_startup.png',
icon: 'resources/img/icon.png',
glossOnIcon: false,
onReady: function() {
sink.Main.init();
}
});
Ext.EventManager.onWindowResize(setActivePanel);
}
function setActivePanel(){
sink.Main.ui.setOrientation( Ext.getOrientation() , window.innerWidth , window.innerHeight );
};