Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[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 Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-03-26T13:38:30.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sRelease 2.0.0, Sprint 2012-06
ComponentsAndroid
Labelsqe-and031912, qe-nfc
ReporterWilson Luu
AssigneeAllen Yeung
Created2012-03-23T21:29:48.000+0000
Updated2012-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

FileDateSize
android.png2012-03-23T21:29:48.000+000019788
ios.png2012-03-23T21:29:48.000+000014333

Comments

  1. Marshall Culpepper 2012-03-24

    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
  2. Wilson Luu 2012-03-26

    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)

JSON Source