Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8268] iOS: Window - Setting the height and width to Ti.UI.SIZE does not shrink to content

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2012-03-26T09:21:26.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sn/a
ComponentsiOS
Labelslook1, parity, qe-ios031912, qe-nfc
ReporterWilson Luu
AssigneeVishal Duggal
Created2012-03-24T09:41:59.000+0000
Updated2017-03-20T22:03:00.000+0000

Description

Steps to reproduce: 1. Run the following code:
var win = Ti.UI.createWindow({
	backgroundColor:'black',
	width:Ti.UI.SIZE,
	height:Ti.UI.SIZE
});

var view = Ti.UI.createView({
	backgroundColor:'white',
	width:40,
	height:40
});

win.add(view);
win.open();
Actual: The window does not shrink to fit the content like on Android. It behaves as if Ti.UI.FILL is still set. See attachments. Expected: The window should shrink to fit the content.

Attachments

FileDateSize
droid.png2012-03-24T09:41:59.000+0000241347
ios.png2012-03-24T09:41:59.000+000016308

Comments

  1. Vishal Duggal 2012-03-26

    It does shrink to size. It is just that the window background color is the same as the default UI background Color. Run this code to verify.
       var win = Ti.UI.createWindow({
       	backgroundColor:'black',
       	width:Ti.UI.SIZE,
       	height:Ti.UI.SIZE,
       	borderColor:'green',
       	borderWidth:2
       });
       
       var view = Ti.UI.createView({
       	backgroundColor:'white',
       	width:40,
       	height:40
       });
       
       win.add(view);
       win.open();
       
  2. Lee Morris 2017-03-20

    Closing ticket as invalid.

JSON Source