Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24600] Android: Ti.UI.SIZE doesn't work properly with horizontal layouts (regression)

GitHub Issuen/a
TypeBug
PriorityCritical
StatusResolved
ResolutionHold
Resolution Date2017-04-22T18:51:13.000+0000
Affected Version/sRelease 6.0.2, Release 6.0.3
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, horizontal, layout, regression
ReporterHans Knöchel
AssigneeGary Mathews
Created2017-04-19T17:19:56.000+0000
Updated2017-05-22T19:06:36.000+0000

Description

Opening based on the (possible) regression caused by TIMOB-24243. The issue was introduced in 6.0.2 and persists on 6.0.3, 6.1.0 and master as well. It was only seen in one project so far that may used a workaround for the bug we fixed in TIMOB-24243, so it might be invalid. Keeping it for the case others run into it.

Comments

  1. Hans Knöchel 2017-04-22

    Regarding the test-case: It's the same source-code [~michael] used (from a customer we both worked with). We agreed last week that there is a good chance the customer used a workaround for the original bug that we fixed that now does not work any more, as the bug is fixed. We both did not see the issue in other apps and as there are no reports from other apps, I'd put it on hold for now. Maybe [~michael] can get the Alloy controller, so we can at least isolate it to that one. Thanks!
  2. Michael Gangolf 2017-05-13

  3. Michael Gangolf 2017-05-22

    *Test code:*
       var win = Ti.UI.createWindow({
       	backgroundColor: 'gray'
       });
       var view = Ti.UI.createView({
       	left: 10,
       	top: 10,
       	width: 100,
       	height: 100,
       	backgroundColor: 'red'
       });
       var viewOuter = Ti.UI.createView({
       	left: 10,
       	top: 10,
       	width: 200,
       	height: 200,
       	backgroundColor: 'green'
       });
       win.addEventListener('open', function() {
       	_.delay(function() {
       		Ti.API.info('  rect.x: ' + view.rect.x + ' - rect.y: ' + view.rect.y);
       	}, 2000)
       })
       viewOuter.add(view);
       win.add(viewOuter);
       win.open();
       
    *Output:* +6.0.1.GA/6.0.2.GA+ rect.x: 10 - rect.y: 10 +6.0.3.GA/6.0.4.GA+ rect.x: 20 - rect.y: 100 (that is outerview left + actionbar +outerview top) For parity reasons it would be good to get back the 6.0.2.GA value and not use getLocationInWindow()

JSON Source