Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9129] iOS: Titanium.NavGroup - Navbar comes in partial size after orientation is changed

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2012-05-21T10:32:46.000+0000
Affected Version/sRelease 2.0.2
Fix Version/sn/a
ComponentsiOS
Labelsapi, qe-ios050912
ReporterTamila Smolich
AssigneeNeeraj Gupta
Created2012-05-14T14:14:03.000+0000
Updated2017-03-09T22:47:55.000+0000

Description

Description: Navbar comes in partial size after orientation is changed from portrait to landscape mode. This bug exists on 2.0.1 as well. Steps to reproduce: 1. Run the following code:
//Here's the first window...
var first = Ti.UI.createWindow({
	backgroundColor : "#fff",
	title : "My App",
	barImage : 'bartop.png'
});

if(Ti.Platform.osname == 'android') {
    var aLabel = Ti.UI.createLabel({
		text : "skip this test",
		top : 10,
		height : 30
	});
	first.add(aLabel);
	first.open();
} else {

	var label = Ti.UI.createLabel({
		text : "poke me to open the next window",
		top : 0,
		height : 30
	});
	first.add(label);

	var label2 = Ti.UI.createLabel({
		text : "poke me to open the next window",
		top : 40,
		height : 30
	});

	//Here's the nav group that will hold them both...
	var navGroup = Ti.UI.iPhone.createNavigationGroup({
		window : first
	});

	//Here's a window we want to push onto the stack...
	var second = Ti.UI.createWindow({
		backgroundColor : "#fff",
		title : "Child Window",
		barImage : 'bartop.png'
	});
	second.add(label2);

	//Here's a window we want to push onto the stack...
	var third = Ti.UI.createWindow({
		backgroundColor : "#fff",
		title : "I'm a hidden title",
		barImage : 'bartop.png'
	});
	third.add(Ti.UI.createLabel({
		text : "Here's the child with hidden title",
		color : '#000000'
	}));

	//When the label on the first window receives a touch, open the second
	label.addEventListener("click", function(e) {
		navGroup.open(second);
	});
	//When the label on the first window receives a touch, open the second
	label2.addEventListener("click", function(e) {
		navGroup.open(third);
	});
	//This is the main window of the application
	var main = Ti.UI.createWindow();
	main.add(navGroup);
	main.open();
}
2. Press the "poke me to open the next window" label 3. Rotate device to the lanscape mode Expected result: The navbar should fill all width of the screen Actual result: Navbar comes in partial size

Attachments

FileDateSize
Screenshot 2012.05.14 14.08.55.png2012-05-14T14:14:03.000+0000130015

Comments

  1. Lee Morris 2017-03-09

    Closing ticket as duplicate.

JSON Source