-
7 Feb 2011 12:21 AM #1
Floating panel resize on orientation change
Floating panel resize on orientation change
Hi. I have a nested list that shows on a button click.
I set its size this way:
Now, if I start the application with my mobile in vertical orientation and i change orientation the nestedlist size won't change. I've tried with "onorientationchange:" but had no succes. Can anyone help with that? thanksCode:width: Ext.Element.getViewportWidth()*0.75, height: Ext.Element.getViewportHeight()*0.9,
EDIT: Finally i've been able with:
Code:orientationchange: function(nestedList, orientation, width, height){ if(orientation=="landscape"){ nestedList.setWidth(Ext.Element.getViewportWidth()*0.9); nestedList.setHeight(Ext.Element.getViewportHeight()*0.8); }else if (orientation=="portrait"){ nestedList.setWidth(Ext.Element.getViewportWidth()*0.75); nestedList.setHeight(Ext.Element.getViewportHeight()*0.95); } }
Similar Threads
-
Change Ext.Panel layout on orientation change
By Plastic in forum Sencha Touch 1.x: DiscussionReplies: 3Last Post: 30 May 2011, 12:47 AM -
Orientation change re arrange items in a panel
By kfelix18 in forum Sencha Touch 1.x: DiscussionReplies: 1Last Post: 5 Jan 2011, 2:29 PM -
[CLOSED-456] Viewport Resize Removes Width attribute on floating panel
By gcallaghan in forum Sencha Touch 1.x: BugsReplies: 2Last Post: 8 Nov 2010, 12:30 PM -
Panel Resize after change orientation
By stefx in forum Sencha Touch 1.x: DiscussionReplies: 8Last Post: 24 Aug 2010, 3:13 AM -
Best way to resize panel based on change in iframe content
By jac1092 in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 17 Aug 2008, 11:45 PM


Reply With Quote