Strange behaviour when use Ti.UI.SIZE for the view height

You must Login before you can answer or comment on any questions.

titanium sdk: 2.1.1 os: mac os platform: iphone simulator 5.1

var postTime = Ti.UI.createLabel({
        text : 'text',
        left : 10,
        width : '50%',
        font : {
            fontsize : 10
        }
    });
    var commentIcon = Ti.UI.createImageView({
        top : 10,
        bottom : 10,
        height : 20,
        width : 20,
        left : '30%',
        image : '/images/comment.png'
    });
 
    var bottomBar = Ti.UI.createView({
        height : Ti.UI.SIZE,
        width : Ti.UI.FILL,
        layout : 'horizontal'
    });
 
    bottomBar.add(postTime);
    bottomBar.add(commentIcon);
the postTime and commentIcon are not on the same line, there are quite big space between them, hence make the bottomBar look so ugly. if i set the height of the bottomBar to a fixed value, say 40, it will be presented as expected.

— asked 8 months ago by kent hao
0 Comments

Your Answer

Think you can help? Login to answer this question!