Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10856] iOS: Implicit height calculation in vertical layouts are incorrect

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-09-14T15:38:17.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 2.1.3, Release 3.0.0, Sprint 2012-19 API, 2012 Sprint 19
ComponentsiOS
Labelscore, layout, qe-testadded
ReporterAllen Yeung
AssigneeVishal Duggal
Created2012-09-11T16:30:57.000+0000
Updated2013-09-19T10:39:17.000+0000

Description

var win = Ti.UI.createWindow({
    backgroundColor:'white',
    layout:'vertical'
})
var view1 = Ti.UI.createView({
    top: 100,
    left:5,
    right: 5,
    bottom: 100,
    backgroundColor:'red'
});
win.add(view1);
win.open();

view1.addEventListener('click', function(){
	Ti.API.info('----------------' + view1.size.height)
})

Expected Behavior: The height of the red view should be the height of the screen minus the top and bottom values. Actual: The height of the red view is 460

Comments

  1. Vishal Duggal 2012-09-12

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/2928
  2. Vishal Duggal 2012-09-19

    Backport PR https://github.com/appcelerator/titanium_mobile/pull/3001
  3. Lokesh Choudhary 2012-09-21

    Verified the fix on: MAC OSX 10.8.1 Titanium studio : 2.1.2.201208301612 SDK version : 3.0.0.v20120921144915 xcode 4.5 built with iOS6 SDK on Ipad 3 running iOS6 & on Iphone simulator.
  4. Tamila Smolich 2012-09-21

    Tested and verified on: OS: Mac OS X Lion 10.7.4 Titanium Studio, build: 2.1.2.201208301612 Titanium SDK, build: 2.1.3.v20120921141611 Device: iPhone 4S (6.0.GM) The height of the red view is equal to the height of the screen minus the top and bottom values.

JSON Source