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