[TIMOB-8262] Android: Layout: When ti.ui.defaultunit is set to an invalid value, views that use the default unit will not be displayed
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-03-26T13:38:30.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | Release 2.0.0, Sprint 2012-06 |
Components | Android |
Labels | qe-and031912, qe-nfc |
Reporter | Wilson Luu |
Assignee | Allen Yeung |
Created | 2012-03-23T21:29:48.000+0000 |
Updated | 2012-03-26T13:38:30.000+0000 |
Description
Steps to reproduce:
1. Put the following code in app.js:
var win = Ti.UI.createWindow({
backgroundColor:'black'
});
var view = Ti.UI.createView({
backgroundColor:'white',
width:300,
height:300
});
win.add(view);
win.open();
2. In tiapp.xml, replace ti.ui.defaultunit with:
<property name="ti.ui.defaultunit">abc</property>
3. Launch to Android
Actual: A white view does not appear. See attachment.
Expected: A white square view should appear.
Note:
* The above code works as expected on iOS. See attachment.
Attachments
File | Date | Size |
---|---|---|
android.png | 2012-03-23T21:29:48.000+0000 | 19788 |
ios.png | 2012-03-23T21:29:48.000+0000 | 14333 |
The behavior for an invalid default unit is not currently specified, but default to system units is probably a valid expectation: https://wiki.appcelerator.org/display/guides2/UI+Composite+Layout+Behavior+Spec We should make a minor update to the spec and fix this
Closing bug. Verified fix on: SDK build: 2.0.0.v20120325213306 Runtime: v8, rhino Titanium Studio, build: 2.0.0.201203262445 Device: Device: Galaxy Nexus (4.0.2)