[TIMOB-7993] Android: Parity: Child view with fill behavior should recursively look at parents for width/height constraint when direct parent has size behavior
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-04-04T14:37:03.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | Release 2.0.0, Sprint 2012-06 |
Components | Android |
Labels | module_view, qe-testadded |
Reporter | Allen Yeung |
Assignee | Allen Yeung |
Created | 2012-03-14T10:36:40.000+0000 |
Updated | 2017-08-15T23:15:42.000+0000 |
Description
When there is a parent with SIZE and a child with FILL, android will follow the size behavior for both the parent and child. We should follow the iOS behavior and let the child look for the parent's parent for width/height constraints.
Run the following code:
var win = Ti.UI.createWindow({backgroundColor:'white'});
var parent = Ti.UI.createView({
height: Ti.UI.SIZE,
backgroundColor: 'green'
});
var child = Ti.UI.createView({
backgroundColor: 'blue'
});
parent.add(child);
win.add(parent);
win.open();
Expected result:
The blue view should cover the screen. (The child fills to the window, and the parent's size behavior will constrain to the child, which is the whole view)
Actual result:
The app shows a white view.
PR 1699
Closing bug. Verified fix on: SDK build: 2.0.0.v20120319003254 Runtime: v8, rhino Titanium Studio, build: 2.0.0.201203182248 Device: Droid 1 (2.2.3)
Reopening/closing to add/remove labels