Brendan Carroll
26 Jan 2012, 6:59 PM
I think this is a bug or just perhaps I'm missing something but width and height always return same values regardless of orientation.
Sorry copied/paste incorrect. Should be as follows which are the correct args I assume. Still the height and width never update regardless of portrait or landscape on my phone.
See for yourself with debugging enabled - http://mobile.kci.com/parking
Using PR4 iOS 5
Ext.define('Sha.view.Main', {
extend: 'Ext.Container',
xtype: 'mainview',
requires: ['Sha.view.MapContainer', 'Sha.view.MapSettingsContainer', 'Sha.view.MapResultsList', 'Sha.view.AboutContainer', 'Sha.view.ParkingResultsList', 'Sha.view.LotDirections'],
config: {
fullscreen: true,
layout: {
type: 'vbox',
align: 'stretch'
},
items: [{
xtype: 'image',
height: 40,
style: 'background-color:#1F1F1F',
src: 'images/banner2.jpg'//,
//flex: 0
}, {
xtype: 'tabpanel',
activeItem: 0,
tabBarPosition: 'bottom',
flex: 1,
items: [{
xtype: 'mapcontainer',
iconMask: true,
iconCls: 'globe2',
title: 'Map'
}, {
xtype: 'parkingresultslist',
iconMask: true,
iconCls: 'list',
title: 'Parking'
}, {
xtype: 'mapsettings',
iconMask: true,
iconCls: 'settings',
title: 'Settings'
}, {
xtype: 'aboutcontainer',
iconMask: true,
iconCls: 'info',
title: 'Services'
}, {
xtype: 'lotdirections',
iconMask: true,
iconCls: 'compass3',
title: 'Directions'
}]
}]
},
initialize: function () {
//console.log('initialize viewport');
this.callParent(arguments);
Ext.Viewport.on('orientationchange', 'handleOrientationChange', this, { buffer: 50});
},
handleOrientationChange: function (t, o, w, h) {
console.log('calling layout');
console.log(w);
console.log(h);
console.log('done call');
}
});
Sorry copied/paste incorrect. Should be as follows which are the correct args I assume. Still the height and width never update regardless of portrait or landscape on my phone.
See for yourself with debugging enabled - http://mobile.kci.com/parking
Using PR4 iOS 5
Ext.define('Sha.view.Main', {
extend: 'Ext.Container',
xtype: 'mainview',
requires: ['Sha.view.MapContainer', 'Sha.view.MapSettingsContainer', 'Sha.view.MapResultsList', 'Sha.view.AboutContainer', 'Sha.view.ParkingResultsList', 'Sha.view.LotDirections'],
config: {
fullscreen: true,
layout: {
type: 'vbox',
align: 'stretch'
},
items: [{
xtype: 'image',
height: 40,
style: 'background-color:#1F1F1F',
src: 'images/banner2.jpg'//,
//flex: 0
}, {
xtype: 'tabpanel',
activeItem: 0,
tabBarPosition: 'bottom',
flex: 1,
items: [{
xtype: 'mapcontainer',
iconMask: true,
iconCls: 'globe2',
title: 'Map'
}, {
xtype: 'parkingresultslist',
iconMask: true,
iconCls: 'list',
title: 'Parking'
}, {
xtype: 'mapsettings',
iconMask: true,
iconCls: 'settings',
title: 'Settings'
}, {
xtype: 'aboutcontainer',
iconMask: true,
iconCls: 'info',
title: 'Services'
}, {
xtype: 'lotdirections',
iconMask: true,
iconCls: 'compass3',
title: 'Directions'
}]
}]
},
initialize: function () {
//console.log('initialize viewport');
this.callParent(arguments);
Ext.Viewport.on('orientationchange', 'handleOrientationChange', this, { buffer: 50});
},
handleOrientationChange: function (t, o, w, h) {
console.log('calling layout');
console.log(w);
console.log(h);
console.log('done call');
}
});