Tabs 导航组内的选项卡组-导航栏显示和导航组标题均缺失

Tabs 导航组内的选项卡组-导航栏显示和导航组标题均缺失,tabs,navigation,titanium,titanium-mobile,Tabs,Navigation,Titanium,Titanium Mobile,我有一个包含消息传递系统的应用程序。它由一个TableView组成,它使用一个NavGroup(我使用的是Ti 1.7.5)拆分为两个选项卡组 我看到的问题有两个方面 显示导航组和选项卡的标题栏,以及 选项卡组的标题未显示在导航组标题栏中 以下屏幕截图说明了这两个问题: 代码(请注意,这是大量总结): 是否有人知道如何从选项卡组中获得导航栏中的标题?这是虫子吗 感谢您的帮助。不要在导航组中使用选项卡组,因为它们都是窗口管理器,在顶部显示标题栏 见: 虽然它看起来不一样,但应该使用a来代替。

我有一个包含消息传递系统的应用程序。它由一个TableView组成,它使用一个NavGroup(我使用的是Ti 1.7.5)拆分为两个选项卡组

我看到的问题有两个方面

  • 显示导航组和选项卡的标题栏,以及
  • 选项卡组的标题未显示在导航组标题栏中
以下屏幕截图说明了这两个问题:

代码(请注意,这是大量总结):

是否有人知道如何从选项卡组中获得导航栏中的标题?这是虫子吗


感谢您的帮助。

不要在导航组中使用选项卡组,因为它们都是窗口管理器,在顶部显示标题栏

见:


虽然它看起来不一样,但应该使用a来代替。

在哪里打开Tab Critical的主窗口?@MuhammadZeeshan在表视图外的click事件中,它在哪里打开navGroup,它在打开TabGroup,选项卡用它打开(我不必指定)。是否尝试设置窗口标题?是的,这就是问题所在!窗口的标题未显示在导航组标题栏中。
csu.module.messages.createMainWindow = function() {
    csu.module.messages.mainWindow = Ti.UI.createWindow($$.moduleMainWindow);
    csu.module.messages.navGroupContainer = Ti.UI.createWindow($$.modalContainer);
    var mainTableView = Ti.UI.createTableView($$.tableView);

    csu.module.messages.navGroup = Ti.UI.iPhone.createNavigationGroup({
        window: csu.module.messages.mainWindow
    }); 

    ...

    mainTableView.addEventListener('click', function(e){
        // Event info
        var index = e.index, section = e.section, row = e.row, rowData = e.rowData;

        switch(index) {
            case 0:
                // inbox;
                csu.module.messages.inboxView = csu.module.messages.createInboxView(); // returns the tabgroup
                csu.module.messages.navGroup.open(csu.module.messages.inboxView);
                break;
            case 1:
                // archive;
                csu.module.messages.archiveView = csu.module.messages.createArchiveView(); // Returns another tabgroup
                csu.module.messages.navGroup.open(csu.module.messages.archiveView);
                break;
        }
    });

    ...

    csu.module.messages.mainWindow.add(mainTableView);
    csu.module.messages.navGroupContainer.add(csu.module.messages.navGroup);
}

csu.module.messages.createInboxView = function() {
    var tabGroup = Ti.UI.createTabGroup({
        title: 'Inbox',
        navBarHidden: false,
        backgroundColor: '#000000',
        barColor: csu.ui.theme.headerColor // black
    });

    var criticalInbox = csu.module.messages.createListWindow(m_Config.MESSAGE_TYPE_CRITICAL, true);

    csu.module.messages.criticalInboxTab = Ti.UI.createTab({
        title: 'Critical',
        icon: 'images/tab-critical.png',
        window: criticalInbox
    });

    ...

    // two other tabs are created

    tabGroup.addTab(csu.module.messages.criticalInboxTab);
    tabGroup.addTab(csu.module.messages.importantInboxTab);
    tabGroup.addTab(csu.module.messages.generalInboxTab);

    return tabGroup;
};

csu.module.messages.createListWindow = function(listType, isInbox) {
    var tabWindow, title, tableView;

    switch(listType) {
        case m_Config.MESSAGE_TYPE_CRITICAL:
            title = 'Critical';
            break;
        case m_Config.MESSAGE_TYPE_IMPORTANT:
            title = 'Important';
            break;
        case m_Config.MESSAGE_TYPE_GENERAL:
            title = 'General';
            break;
    };

    tableView = Ti.UI.createTableView();
    var tableData = new Array();
    tableView.setData(tableData);

    tabWindow = Ti.UI.createWindow({
        title: title,
        navBarHidden: false         
    });

    tabWindow.add(tableView);

    return tabWindow;
}