2012-02-24 8 views
0

私はメッセージングシステムを含むアプリケーションを持っています。これは、NavGroup(私はTi 1.7.5を使用しています)を使用して2つのタブグループに分割されたTableViewで構成されています。NavGroup内のTabGroup - Navbarの両方が表示され、NavGroupのタイトルが見つかりません。

私が見ている問題は2つあります。 NavGroupとタブの

  • どちらのタイトルバーが表示されている、と
  • TabGroupのタイトルはNavGroupのタイトルバーに表示されていません。 (これは頻繁に要約されますのでご注意ください)

    TabGroup in a NavGroup problem

    コード:

次のスクリーンショットは、両方の問題を示して

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

は誰でも取得するために周りの仕事か何かを知っていますTabGroupからのナビゲーションバーのタイトル?これはバグですか?

あなたのお役に立てれます。

+0

タブクリティカルのメインウィンドウを開きますか? –

+0

@MuhammadZeeshan navGroupを開くテーブルビューのクリックイベントでは、TabGroupが開きます。タブが開いています(指定する必要はありません)。 – Cyntech

+0

Windowsのタイトルを設定しようとしましたか? –

答えて

関連する問題