Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Splitview and tabbar (ipad)

Hi ,

Is it possible to have a Splitview with a master and detail view and at the the bottom have the tabbar (or tabgroup) ?

Thanks in advance?

— asked October 22nd 2010 by Michael Bleh
  • bar
  • ipad
  • splitview
  • tab
  • tabbar
0 Comments

2 Answers

  • Here is my simple example code:

    
    var tg = Ti.UI.createTabGroup({
    });
    
    tg.addTab(Ti.UI.createTab({
        window: Ti.UI.createWindow({
            title: 'almafa',
            backgroundColor: 'red'
        }),
        title: 'alma'
    }));
    
    tg.addTab(Ti.UI.createTab({
        window: Ti.UI.createWindow({
            title: 'kortefa',
            backgroundColor: 'blue'
        }),
        title: 'korte'
    }));
    
    var win = Ti.UI.createWindow();
    
    var nav = Ti.UI.iPhone.createNavigationGroup({
       window: win
    });
    
    var splitwin = Ti.UI.iPad.createSplitWindow({
        detailView: nav,
        masterView: tg
    });
    
    splitwin.addEventListener('visible',function(e)
    {
        if (e.view == 'detail')
        {
            e.button.title = "Master";
            win.leftNavButton = e.button;
        }
        else if (e.view == 'master')
        {
            tg.open();
            win.leftNavButton = null;
        }
    });
    
    splitwin.open();
    
    — answered February 4th 2012 by Kristof Gruber
    permalink
    0 Comments
  • Yes! It is posible to do almost anything you want. What exactly are you trying to do? Add a Tabgroup to the detail view, or a Tabgroup to all the view and on top of it have the detail? both ways are posible. Just create a Main Window and add both your Tabgroup and SplitView.

    — answered November 9th 2011 by daniel axelrod
    permalink
    1 Comment
    • Do you have an example of this that you could share?

      — commented December 23rd 2011 by Michael Miller
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.