[TIMOB-3205] Android: Null dimensions should be ignored or throw an exception
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2012-08-31T14:04:26.000+0000 |
Affected Version/s | Release 1.6.0 |
Fix Version/s | n/a |
Components | Android |
Labels | core |
Reporter | Dawson Toth |
Assignee | Neeraj Gupta |
Created | 2011-04-15T03:39:27.000+0000 |
Updated | 2017-03-27T18:20:50.000+0000 |
Description
Problem
If you create a view and set one of the dimensions (such as "right") to null, it will still influence the layout of the view.
Example
The expected behavior for the following would be a view that is 100px high and 100px width, left aligned. But when you set right: null, it will stretch across the entire view.
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
win.add(Ti.UI.createLabel({
text: 'Right null test', textAlign: 'center',
left: 0, top: 0, width: 100, height: 100,
backgroundColor: '#f00',
right: null
}));
win.open();
Workaround
Don't include the dimension with null and it won't influence the layout.
Tested On
Titanium SDK version: 1.7.0 (02/18/11 18:13 316c2c7)
BROKEN on Android Device 2.1
WORKS on iPhone Simulator 4.2
Associated Helpdesk Ticket
http://developer.appcelerator.com/helpdesk/view/75421">http://developer.appcelerator.com/helpdesk/view/75421
Tested on a Samsung Galaxy S2 using TiSDK 2.2.0v20120830102513, unable to reproduce the issue. Ticket marked as resolved.
Closing ticket as I am unable to reproduce this issue with the following environment; Pixel (7.1) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.3 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80