在Sencha touch 2上设置布局

时间:2012-04-30 14:28:20

标签: javascript sencha-touch extjs sencha-touch-2

我在尝试更改方向时尝试setLayout,但是我遇到了这种类型的错误:

*Console.js:17Uncaught Error: [ERROR][Ext.Container#setLayout] Replacing a layout after one has already been initialized is not currently supported.*

我无法得到,这里发生了什么。这是我的代码:

  onOrientationChange:function(viewport, orientation){  
        viewport.setLayout('vbox');
  }

视口位于:

Ext.define("Q4.view.blg", {
    extend: 'Ext.Container',
    xtype:  'blg',
    config:{    
        title:"blg",
        iconCls:'star',
        cls:'blogList',
        disableSelection: true,
        layout: 'hbox',
        defaults:{
            scrollable:false
        },........

谢谢!!!!!!

0 个答案:

没有答案