Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[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 Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-04-04T14:37:03.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sRelease 2.0.0, Sprint 2012-06
ComponentsAndroid
Labelsmodule_view, qe-testadded
ReporterAllen Yeung
AssigneeAllen Yeung
Created2012-03-14T10:36:40.000+0000
Updated2017-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.

Comments

  1. Vishal Duggal 2012-03-17

    PR 1699
  2. Wilson Luu 2012-03-19

    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)
  3. Michael Pettiford 2012-04-04

    Reopening/closing to add/remove labels

JSON Source