Android Tab bar disapearing

You must Login before you can answer or comment on any questions.

Hi, I am porting a tabbed iPhone app to android which opens up fine with the tabs displayed at the top, but as soon as I open a window from the tab group it hides the tab bar and just shows the window. How do I make the tab bar stay there when I open a new window.

Any help is much appreciated, Matt

function viewCourse(title) {
    var self = Ti.UI.createWindow({
        title:title,
        backgroundColor:'white'
    });
    Ti.App.addEventListener('databaseUpdated', function(){
        tableRows();
    });
    var db = require('lib/db');
    var groupsWindow = require('ui/handheld/groupsWindow');
        //groupsWindow.containingTab = self.containingTab;
 
    var view = Ti.UI.createScrollView({
        backgroundColor:'transparent',
        height:'auto',
        width:'auto',
        contentWidth:'auto',
        contentHeight:'auto'
 
    });
    var table = Ti.UI.createTableView({});
    var tableRows = function(){
        //get courses from database
        var rows = db.select('course');
        var data = [];
 
        for(i=0;i<rows.length;i++){
            var row = Ti.UI.createTableViewRow({
            width:'90%',height:50, title:rows[i].title, id:rows[i].id,hasChild:true
            });
 
            //row.backgroundImage = Ti.Filesystem.resourcesDirectory + '/images/opac_bg.png';
            data.push(row);
        }
        table.setData(data);
    }
    tableRows();
 
    view.add(table);
 
...........
 
table.addEventListener('click', function(e) {
        var gw1 = new groupsWindow('View Groups',e.source.id);
        gw1.containingTab = self.containingTab;
        self.containingTab.open(gw1);
 
    });

— asked 10 months ago by Matt Hale
4 Comments
  • My understanding is that is not the way the Android version of the tabgroup works. It only functions as a 'gateway' to top level windows after clicking a tab.

    — commented 10 months ago by Nick Milner

  • Is there anyway of keeping it there? or is it just the android way? Thanks, Matt

    — commented 10 months ago by Matt Hale

  • Matt,

    This is one of those platform design things that make IOS and Android unique. I love how I can open a window on a tab in IOS and automagically get a controller to keep track fo the stack for me.

    At the same time, I love how on android, I open windows and have a back button on the device I didn't have to program. (you still ought to be adding an android:back eventlistener to your windows that actually closes the windows)

    Both sides (Apple and Google) tell us that their groups of users are too dumb (wait, they didn't use the word dumb thats just how it comes across in the docs) to adjust to anything different than what their gui gods have laid out.

    However, with all that in mind, Titanium proxies the base building blocks from the platform sdks. As Alexander says below, you would need to build out custom implementations.

    — commented 10 months ago by Stephen Feather

  • Show 1 more comment

1 Answer

Accepted Answer

Its because your windows are fullscreen, in iOS each tab has its own NavgationGroup (UINavigationController). In android there is none, since it has a hardware backbutton (supposed). You will need to have a custom NavGroup if you want to keep the same layout/ui flow, handling the resizing and aligning the windows properly.

Your Answer

Think you can help? Login to answer this question!