Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19598] Bug with Ti.UI.SIZE for view height on android

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2017-08-23T00:06:03.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.2.0
ComponentsAndroid
LabelsTCSupportTriage, android
ReporterAndrey Pervushin
AssigneeJoshua Quick
Created2014-12-24T14:47:35.000+0000
Updated2017-08-23T00:06:46.000+0000

Description

height for view on android calculating wrong and different then on iOS this happens if layout set to 'horizontal' and child views have width set to Ti.UI.FILL ~~~ var win = Ti.UI.createWindow({ backgroundColor : '#fff' }); var font = { fontSize : '14dp' }; var View = Ti.UI.createView({ height : Ti.UI.SIZE, borderColor : '#666', borderWidth : '1dp', left : '10dp', right : '10dp', top : '50dp', layout : 'horizontal', backgroundColor : '#dfd' }); var toLabel = Ti.UI.createLabel({ left : '5dp', top : '5dp', text : 'To:', width : Ti.UI.SIZE, font : font, backgroundColor : '#dfa' }); var toCardLabel = Ti.UI.createLabel({ top : '5dp', right : '5dp', text : '123456789\n($456)', width : Ti.UI.FILL, textAlign : 'right', font : font, color : '#666', backgroundColor : '#bfd' }); var fromLabel = Ti.UI.createLabel({ left : '5dp', top : '5dp', text : 'From:', width : Ti.UI.SIZE, font : font, backgroundColor : '#bdd' }); var fromCardLabel = Ti.UI.createLabel({ top : '5dp', right : '5dp', text : '123456789\n($456)', width : Ti.UI.FILL, textAlign : 'right', font : font, color : '#666', backgroundColor : '#ee9' }); var amountLabel = Ti.UI.createLabel({ left : '5dp', top : '5dp', bottom : '5dp', height : Ti.UI.SIZE, text : 'Amount to transfer:', width : Ti.UI.SIZE, font : font, backgroundColor : '#ee6' }); var amountField = Ti.UI.createLabel({ top : '5dp', right : '5dp', text : '$1245', width : Ti.UI.FILL, textAlign : 'right', color : '#393', font : font, backgroundColor : '#cdb' }); win.add(View); View.add(toLabel); View.add(toCardLabel); View.add(fromLabel); View.add(fromCardLabel); View.add(amountLabel); View.add(amountField); win.open(); ~~~

Attachments

FileDateSize
Снимок экрана 2014-12-24 в 16.41.46.png2014-12-24T14:47:35.000+000049739

Comments

  1. Abir Mukherjee 2017-08-23

    Passed FR. PR merged. Changes are seen in SDK versions: 6.2.0.v20170822113609 7.0.0.v20170822142802

JSON Source