Sencha Touch 2 Listview,TabPanel放置错误



我的代码是:

RNM.Communication = function () {
var listView = new Ext.List({
    itemTpl: '(title)',
    data: [
        { title: 'Item 1' },
        {title:'Item 2'},
    ]
});
var tabBar = new Ext.TabPanel({
        items: [
            {
                title:'Notification'
            },
            {
                title:'Report'
            },
        ]
});

var communicationPanel = new Ext.Panel({
    title: 'Panel',
    id: 'commPanelHandler',
    items: [listView,tabBar]
});
this.getComponent = function () {
    return communicationPanel;
}
}

但似乎tabBar,似乎没有listview,

当我按下Tab按钮时,我想转到不同的页面,如果你能帮忙,我将不胜感激。

我解决了问题

 var listView = new Ext.List({
    itemTpl: '(title)',
    flex:1,
    data: [
        { title: 'Item 1' },
        {title:'Item 2'},
    ]
});

最新更新