Sencha touch 2 如何在列表中隐藏标题栏?

Sencha touch 2 如何在列表中隐藏标题栏?,sencha-touch-2,Sencha Touch 2,默认情况下,列表没有标题栏,但当我以这种方式创建列表时,它有一个空标题栏 Ext.define('Application.view.RecipeList', { extend: 'Ext.List', xtype: 'recipelist', requires: ['Application.store.Recipes'], id:'list', config: { grouped: true,

默认情况下,列表没有标题栏,但当我以这种方式创建列表时,它有一个空标题栏

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
    }
});

有人能帮我理解如何隐藏标题栏吗?

空栏实际上是你的导航栏

如果要隐藏它,只需将
主面板中的
导航栏设置为
false

更新

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

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
    }
});

但是,当你切换到详细信息卡时,你需要隐藏它,但我会让你知道如何做到这一点。

这真的是你应用程序中的全部内容吗?相同的结果请参见我的更新答案。但是你再也没有导航栏了,所以你将无法从详细信息面板返回。因此,我建议您将搜索栏放在导航栏中,并在导航栏中放置一个搜索字段。我也考虑过,但我在controller main.js中添加了一个搜索字段,是否可以将其添加到导航视图中?