plug12
8 Feb 2012, 12:55 AM
Hi.
I tried everything, but nothing worked for me.
I want to get the orientation change for the Idiomatic Layout Tutorial(http://www.sencha.com/learn/idiomatic-layouts-with-sencha-touch), but the setProfile methods are not called.
I changed the PhoneGapViewController.m like in this thread (http://www.sencha.com/forum/showthread.php?109839-onOrientationChange-event-is-not-being-handled-properly-on-ip*-devices-by-uiwebview/page2)
And i tried this one from Oxynel (http://blog.oxynel.com/creation-site-internet-montpellier/phonegap-sencha-orientation-change-solution_2010_08)
Ext.setup({
onReady: function() {
panel = new Ext.Panel({
fullscreen: true,
layout: 'card',
items:[{xtype:'panel',contentEl:'portrait-container',scroll:'vertical'},
{xtype:'panel',contentEl:'landscape-container',scroll:'false'}]
});
Ext.EventManager.onWindowResize(setActivePanel);}});
function setActivePanel(){
panel.setOrientation( Ext.getOrientation() , window.innerWidth , window.innerHeight );
};
Somtimes the function works, but i cant call my setProfile methods with this.
Is there any working solution or could anybody help me with this (PhoneGap 1.4.1 with Sencha Touch 1.1.1)?
I tried everything, but nothing worked for me.
I want to get the orientation change for the Idiomatic Layout Tutorial(http://www.sencha.com/learn/idiomatic-layouts-with-sencha-touch), but the setProfile methods are not called.
I changed the PhoneGapViewController.m like in this thread (http://www.sencha.com/forum/showthread.php?109839-onOrientationChange-event-is-not-being-handled-properly-on-ip*-devices-by-uiwebview/page2)
And i tried this one from Oxynel (http://blog.oxynel.com/creation-site-internet-montpellier/phonegap-sencha-orientation-change-solution_2010_08)
Ext.setup({
onReady: function() {
panel = new Ext.Panel({
fullscreen: true,
layout: 'card',
items:[{xtype:'panel',contentEl:'portrait-container',scroll:'vertical'},
{xtype:'panel',contentEl:'landscape-container',scroll:'false'}]
});
Ext.EventManager.onWindowResize(setActivePanel);}});
function setActivePanel(){
panel.setOrientation( Ext.getOrientation() , window.innerWidth , window.innerHeight );
};
Somtimes the function works, but i cant call my setProfile methods with this.
Is there any working solution or could anybody help me with this (PhoneGap 1.4.1 with Sencha Touch 1.1.1)?