problem
It seems that as of TiSDK 3.2.0, when containing Windows mix implicit with explicit definitions of height and width that the views inside of it do not layout properly when they attempt to use Ti.UI.FILL. Since this is a hard one to explain clearly, it's best to look at the very simple test case below. With that test case as is, you will just see a black screen on Android (tested on 4.2.2), which is not expected. If you comment out the
height:Ti.UI.FILL
, it shows the red view covering the screen, which is the expected behavior.
There are likely many permutations of this issue that can affect layouts, but this is the simplest test case I created to surface the issue.
test case
var win = Ti.UI.createWindow({
backgroundColor: '#fff',
// comment out height here and the view shows up fine
height: Ti.UI.FILL
});
win.add(Ti.UI.createView({
backgroundColor: '#a00',
height: Ti.UI.FILL,
width: Ti.UI.FILL
}));
win.open();
expected
Views within a Ti.UI.Window on Android should be able to use Ti.UI.FILL to set there height and width regardless of whether or not height and width are explicitly set in the containing Window, since height and width should be Ti.UI.FILL by default for Windows.
can you please investigate?
PR: https://github.com/appcelerator/titanium_mobile/pull/5069
3.2.X PR: https://github.com/appcelerator/titanium_mobile/pull/5072
Verified with Environment: Appcelerator Studio: 3.2.0.201312101708 SDK: 3.2.0.v20131210191510 alloy: 1.3.0-cr acs: 1.0.10 npm: 1.3.2 titanium: 3.2.0-cr titanium-code-processor: 1.1.0-cr Device: Nexus 7(v4.2.1)/Mac 9 It works as expected. Hence closing the issue.