[TIMOB-7344] iOS: Views - Nested view cannot be displayed when dimension property is defined using percentage
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-03-15T13:25:44.000+0000 |
Affected Version/s | Release 1.8.0.1, Release 1.8.1 |
Fix Version/s | Release 2.0.0 |
Components | iOS |
Labels | module_view, parity, qe-ios012312, qe-testadded |
Reporter | Wilson Luu |
Assignee | Max Stepanov |
Created | 2012-01-23T16:45:10.000+0000 |
Updated | 2012-03-15T13:25:44.000+0000 |
Description
Steps to reproduce:
1. Copy code below to app.js:
var win = Ti.UI.createWindow({
layout: 'vertical',
fullscreen: true
});
var view = Ti.UI.createView({
layout: 'horizontal',
height: 50,
backgroundColor: '#ccf',
width: '50%'
});
var nested_view = Ti.UI.createView({
height: 50,
backgroundColor: '#cfc',
width: '50%'
});
var control = Ti.UI.createView({
layout:'horizontal',
height:50,
backgroundColor: 'red',
width: 160 // 50% of portrait screen width
});
var nested_control = Ti.UI.createView({
height:50,
backgroundColor:'green',
width: 80 // 25% of portrait screen width
});
view.add(nested_view);
win.add(view);
control.add(nested_control);
win.add(control);
win.open();
2. Launch app to an iOS device
Actual: Nested view is not displayed i.e. only one color is displayed on the view. See attachment.
Expected: Should see two colors on the view like Android's behavior. See attachment.
Attachments
File | Date | Size |
---|---|---|
actual.png | 2012-01-23T16:45:10.000+0000 | 19600 |
expected.png | 2012-01-23T16:45:10.000+0000 | 8641 |
Please note that the expected layout when position (left/top/right/bottom) is not specified is center. Thus the expected.png image above is incorrect and a separate issue should be created for nested view positioning with absolute width/height.
Fixes must regress against the following in KS *at minimum*: KS->Base UI->Views->Auto Height KS->Base UI->Views->Min Height KS->Base UI->Vertical->Basic KS->Base UI->Vertical->Table View KS->Base UI->Table Views->Layout 4 KS->Base UI->Table Views->Table Auto Height
Closing issue Tested with Ti Studio build 1.0.8.201201262211 Ti Mob SDK 1.9.0.v20120209183134 OSX Lion 10.7.3 iPhone 4S OS 5.0.1, iPad 1 OS 5.0.1 Verified sample code, and KS tests all pass
Must reopen to update fix version. 1.8.2 will NOT have this fixed due to regressions, but MASTER still has it.
Still fixed in master, leaving unfixed in 1.8.2.
Reclosing to indicate fixed in master.
This bug occurs in: Titanium SDK version: 1.8.2.v20120223174636 Device Details: iPad1 5.0.1 Titanium Studio version: 1.0.9.201202141208
Fixed only for 1.9.0 release.
Closing bug. Verified fix using sample code and KS tests on: SDK build: 2.0.0.v20120315123246 Titanium Studio, build: 2.0.0.201203142055 xcode: 4.2 Device: iphone 4s (5.0.1)