[TIMOB-3241] Height in android
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Closed |
| Resolution | Invalid |
| Resolution Date | 2017-06-05T21:34:06.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Android |
| Labels | 1.6, android, height |
| Reporter | Mark Peace |
| Assignee | Ingo Muschenetz |
| Created | 2011-04-15T03:40:13.000+0000 |
| Updated | 2017-06-05T21:34:06.000+0000 |
Description
Height is not being propagated properly to child components.
In the following code, the 'body' height is read incorrectly when the createWindow has navBarHidden: true or fullscreen:false. It is corrected, though, if I uncomment the alert in the eventlistener
(the code is a mock up of a window with header, footer and a pull up notification panel)
app.js
Titanium.UI.createWindow({ url: 'test.js' }).open();
test.js:
var win = Titanium.UI.currentWindow;
var header = Titanium.UI.createView({
top:0,
height:50,
backgroundColor:'blue'
});
win.add(header)
var body = Titanium.UI.createView ({
top:50,
bottom:50,
backgroundColor:'white'
});
win.add(body);
var pullupPanel = Titanium.UI.createView({
backgroundColor:'green',
height:100
});
body.add(pullupPanel)
var pullupPanelHeader =Titanium.UI.createView ({
backgroundColor:'red',
top:0,
height:30
})
pullupPanel.add(pullupPanelHeader)
var footer = Titanium.UI.createView ({
bottom:0,
height:50,
backgroundColor:'blue'
});
win.add(footer);
win.addEventListener('open', function () {
//alert ("hi");
pullupPanel.top=body.size.height-30;
pullupPanel.height=body.size.height;
})
Closing ticket due to time passed and lack of progress over the past few years.