Layout breaks on orientation change when using cardSwitchAnimation
I'm relatively new to Sencha Touch and I'm developing a mobile application, and I've noticed a few quirks that occur on orientation change when I use cardSwitchAnimation to transition between views.
What's happening is that I have several views that contains a scrollable content area; this works fine in portrait mode with the animation, or in landscape mode without the animation. When in landscape mode and using the animation, the docked items disappear and there's a bunch of white space at the bottom of the view.
For reference, here's my basic presentation-layer structure:
Viewport
- Extends Ext.Panel
- Contains view objects
- Contains docked items
- fullscreen: true
- Layout configuration: card
- cardSwitchAnimation: false
Views
- Extend Ext.Panel
- Belong to Viewport
- Contains one scrollable content area
- Layout configuration: card
- cardSwitchAnimation: slide
Content areas
- belong to Views
- xtype: panel
- scroll: vertical
Solutions I've tried:
- calling doLayout and doComponentLayout in onOrientationChange, for both the views and the viewport
- setting monitorOrientation and onOrientationChange to true, for the both the views and the viewport
- using 'fit' layout type for the views (works, but incompa开发者_运维百科tible with the transition animations)
- using 'fit' layout type for the content areas (content area collapses for some reason)
I'm wracking my brain over this and I can't seem to find a solution. Any ideas?
精彩评论