Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3241] Height in android

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-06-05T21:34:06.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labels1.6, android, height
ReporterMark Peace
AssigneeIngo Muschenetz
Created2011-04-15T03:40:13.000+0000
Updated2017-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;
})

Comments

  1. Lee Morris 2017-06-05

    Closing ticket due to time passed and lack of progress over the past few years.

JSON Source