Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4944] iOS: tabGroup navbar

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2011-09-21T09:21:32.000+0000
Affected Version/sRelease 1.7.2
Fix Version/sSprint 2011-37
ComponentsiOS
Labelsn/a
ReporterJon Alter
AssigneeSabil Rahim
Created2011-08-08T18:54:35.000+0000
Updated2014-06-19T12:46:22.000+0000

Description

When rotating a tabGroup from portrait to landscape the navBar does not resize as it should. Step 1: run the code below Step 2: rotate the device from portrait to landscape Step 3: notice that the navBar does not change height Step 4: click the other tab Step 5: notice the tabBar snap to the smaller height
var tabGroup = Titanium.UI.createTabGroup();

var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff',
    orientationModes:[Titanium.UI.LANDSCAPE_LEFT,Titanium.UI.LANDSCAPE_RIGHT,Titanium.UI.PORTRAIT]
});
var tab1 = Titanium.UI.createTab({  
    icon:'KS_nav_views.png',
    title:'Tab 1',
    window:win1
});

var win2 = Titanium.UI.createWindow({  
    title:'Tab 2',
    backgroundColor:'#fff',
    orientationModes:[Titanium.UI.LANDSCAPE_LEFT,Titanium.UI.LANDSCAPE_RIGHT,Titanium.UI.PORTRAIT]
});
var tab2 = Titanium.UI.createTab({  
    icon:'KS_nav_ui.png',
    title:'Tab 2',
    window:win2
});

tabGroup.addTab(tab1);  
tabGroup.addTab(tab2);  
tabGroup.open();

Associated Helpdesk Ticket

http://appc.me/c/APP-854153

Attachments

FileDateSize
4A129BB2-8C81-46FE-A686-33800F7A6C0D.mov2011-08-22T13:07:22.000+00004318230
tabGroup-navBar.jpg2011-09-15T17:24:11.000+000017704

Comments

  1. Jon Alter 2011-08-22

    Attached an video that demonstrates the issue.
  2. Jon Alter 2011-09-15

    Another Repro Case

    Step 1: run the code below Step 2: rotate the device to landscape and then back to portrait Step 3: notice the black at bar at the top of the window and the navBar size (attached screenshot)
       var tabGroup = Ti.UI.createTabGroup();
       var win1 = Ti.UI.createWindow({
       	backgroundColor : 'white',
       	orientationModes : [Ti.UI.PORTRAIT]
       });
       var label1 = Ti.UI.createLabel({
       	text : 'I am a label'
       });
       win1.add(label1);
       var tab1 = Ti.UI.createTab({
       	title : "tab1",
       	window : win1
       });
       tabGroup.addTab(tab1);
       tabGroup.open();
       
       var win2 = null;
       Ti.Gesture.addEventListener('orientationchange', function(e) {
       
       	if(win2 == null) {
       		win2 = Ti.UI.createWindow({
       			backgroundColor : 'blue',
       			orientationModes : [Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT]
       		});
       		var label2 = Ti.UI.createLabel({
       			text : 'I am a label'
       		});
       		win2.add(label2);
       	}
       	if(e.orientation === Ti.UI.LANDSCAPE_RIGHT || e.orientation === Ti.UI.LANDSCAPE_LEFT) {
       		win2.open();
       	} else {
       		win2.close();
       	}
       });
       

    Resolution

    Confirmed fixed with 1.8.0.v20110915133349, iOS 4.3
  3. Sabil Rahim 2011-09-21

    Issue was fixed as a side effect of Blain's fix of splash screen orientation and this problem should no longer exist.
  4. Alan Vaghti 2011-09-21

    Fix confirmed on both iOS 4.3 and 5 simulators in addition to an iPod touch running 4.3.3 with SDK 1.8.0.v20110920000211.

JSON Source