2012-08-07 50 views
0

我有一个包含3个不同视图(顶部工具栏,内容面板,底部工具栏)的视图, 问题是内容面板(带有Dataview的面板)隐藏在\隐藏工具栏取决于物品的顺序)。Sencha Touch 2具有多个视图的布局

的主要观点是:

Ext.define("myapp.view.myview", { 
    extend: "Ext.Panel", 
    alias: "widget.myview", 
    requires: [ 
     'myapp.view.topMenu', 
     'myapp.view.bottomMenu', 
     'myapp.view.DataContainer' 
    ], 
    config: { 
     fullscreen: true, 
     layout: { 
      type: 'fit', 
     }, 
     items: [         
      { xtype: 'DataContainer'},   
      { xtype: 'topMenu' }, 
      { xtype: 'bottomMenu' } 
     ] 
    } 
}); 

我试着用容器和也尝试过间隔,但它并没有改变任何事情。 谢谢。

回答

0

明白了 - 我不得不把工具栏里面集装箱,码头集装箱的顶部/底部:

Ext.define("App.view.topMenu", { 
extend: "Ext.Container", 
alias: "widget.topMenu", 

config: {   
    docked: "top", 
    items: [ 
    { 
     xtype: "toolbar", 
0

嗨@ItayM你可以改变你configExt.Panel容器中,

config: { 
    fullscreen: true, 
    layout: { 
     type: 'fit', 
    }, 
    ... 
} 

config: { 
    layout: 'vbox', 
    ... 
} 

也许layout: { type: 'fit', },重叠的其他元素融入您的Ext.Panel

希望这些帮助。 :)