2012-06-04 78 views
1

通過默認列表中沒有標題欄的,但是當我以這樣的方式創建列表它有一個空的標題欄的如何在列表中隱藏titleBar?

Ext.define('Application.view.RecipeList', { 
    extend: 'Ext.List', 
    xtype: 'recipelist', 
    requires: ['Application.store.Recipes'], 
    id:'list', 
    config: {    
     grouped: true, 
     itemTpl: '{title}', 
     store: 'Recipes', 
     onItemDisclosure: true 
    } 
}); 

有人可以幫助我瞭解如何隱藏標題欄的?

+0

它真的是你的應用程序中的所有東西嗎? –

回答

0

空欄實際上是您的導航欄。

如果你想隱藏它,你只需要設置navigationBarfalsemainpanel

更新

config: { 
    navigationBar: false, 
    items: [{ 
     xtype: 'recipelist', 
    }] 
} 

更新

這裏是如何添加搜索欄的您的導航欄

this.getMain().getNavigationBar().add({ 
    xtype: 'searchfield', 
    itemId:'contact_search', 
    placeHolder: 'Search....', 
    listeners: { 
     scope: this, 
     clearicontap: this.onSearchClearIconTap, 
     keyup: this.onSearchKeyUp 
    } 
}); 

但是當你切換到明細卡時你需要隱藏它,但我會讓你弄清楚如何做到這一點。

+0

結果相同http://www.senchafiddle.com/#4hKD8#uZlr7#JywGI#3D6PK#DOaF9#NcOoQ#FduGS –

+0

查看我更新的答案。但是,那麼您再也沒有導航欄了,因此您無法從細節面板返回。所以,我建議你把你的搜索欄,並在導航欄中放置一個搜索欄。 –

+0

我也想過了,但我在控制器main.js中添加了一個搜索字段,是否可以將其添加到導航視圖? –