Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5745] iOS: Buttons shrinking on orientation in 1.8.x CI Build

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2011-11-09T09:57:46.000+0000
Affected Version/sRelease 1.8.0
Fix Version/sSprint 2011-45
ComponentsiOS
Labelsregression
ReporterFrancisco Antonio Duran Ramirez
AssigneeSabil Rahim
Created2011-10-13T08:44:12.000+0000
Updated2014-06-19T12:44:00.000+0000

Description

Problem

Customer has two buttons docked at the bottom on a view.When the orientation of the window is changed from landscape to portrait the buttons are shrinking. Customer is using images for these buttons and setting the left and right alignments in %. If you test the application with 1.7.2, it works well, but if you test test the application with 1.8.0.v20110930164213, it does not work well.

Reproducible steps:

1.Run the code below.

Expected behavior

Customer wants to have the same behavior of 1.7.2 SDK in 1.8.x CI Build.

Sample Code:

var win1 = Titanium.UI.createWindow({
	title : 'Tab 1',
	backgroundColor : '#fff'
});

var label1 = Titanium.UI.createLabel({
	color : '#999',
	text : 'I am Window 1',
	font : {
		fontSize : 20,
		fontFamily : 'Helvetica Neue'
	},
	textAlign : 'center',
	width : 'auto'
});

win1.add(label1);

var containerView = Ti.UI.createView({
	left : 0,
	right : 0,
	height : 62,
	bottom : 0,
	backgroundColor : '#EEEEEE'
});

var Btn1 = Ti.UI.createButton({
	backgroundImage : 'KS_nav_ui.png',
	height : 41,
	left : '5%',
	right : '52.5%',
	title : 'Button1',
	borderRadius : 4,
	font : {
		fontSize : 18,
		fontWeight : 'bold',
		fontFamily : 'Helvetica Neue'
	},
	color : 'black'

});

var Btn2 = Ti.UI.createButton({

	height : 41,
	left : '52.5%',
	right : '5%',
	title : 'Button2',
	visible : true,
	font : {
		fontSize : 18,
		fontWeight : 'bold',
		fontFamily : 'Helvetica Neue'
	},
	backgroundImage : 'KS_nav_ui.png',
	color : 'black'

});
containerView.add(Btn1);
containerView.add(Btn2);
win1.add(containerView);
win1.open();


Helpdesk

APP-513861

Attachments

FileDateSize
1.7.2.png2011-10-13T08:44:12.000+0000123412
1.8.0.v20110930164213.png2011-10-13T08:44:12.000+0000121197

Comments

  1. Michael Pettiford 2012-01-11

    Closing issue due to not being able to reproduce Tested with Ti Studio 1.0.8.201201101928 Ti Mob SDK 1.8.0.1 OSX Lion iPhone 4S OS 5.0.1, iPad 2 OS 5.0.1

JSON Source