GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-08-08T00:06:18.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Sprint 2012-15 Core, Release 3.0.0, 2013 Sprint 16, 2013 Sprint 16 API, Release 3.1.2, Release 3.2.0 |
Components | Android |
Labels | core, layout, module_window, qe-3.1.2, qe-review, qe-testadded, regression |
Reporter | Allen Yeung |
Assignee | Ping Wang |
Created | 2012-07-25T13:38:33.000+0000 |
Updated | 2013-12-10T06:20:24.000+0000 |
var win = Ti.UI.createWindow({
backgroundColor: '#000',
layout: 'vertical',
navBarHidden: true
});
var view = Ti.UI.createView({
width:200,
height: 200
});
win.add(view);
view.addEventListener('postlayout', function(){
Ti.API.info('View postlayout');
});
win.addEventListener('postlayout', function(e) {
Ti.API.info('Window postlayout');
});
win.open();
Expected:
Each layout should be printed out two only. (The fact that it prints out twice instead of once is another bug)
I/TiAPI (30816): View postlayout
I/TiAPI (30816): Window postlayout
I/TiAPI (30816): View postlayout
I/TiAPI (30816): Window postlayout
Actual:
The window event gets printed out two additional times.
I/TiAPI (30996): View postlayout
I/TiAPI (30996): Window postlayout
I/TiAPI (30996): Window postlayout
I/TiAPI (30996): View postlayout
I/TiAPI (30996): Window postlayout
I/TiAPI (30996): Window postlayout
PR Ready: https://github.com/appcelerator/titanium_mobile/pull/2640
Fixed by PR https://github.com/appcelerator/titanium_mobile/pull/2640 against master
Closing as fixed. Tested and verified on: Titanium Studio, build: 2.1.1.201208091713 Titanium SDK, build: 2.2.0.v20120810194112 Devices: Nexus 7 tab (4.1), HTC Evo (4.0.3)
Reopening to update labels
This is a regression. This issue is not reproducible in SDK 3.1.1.GA build but its reproducible in latest 3.1.2.v20130806104555 build. verified in below environment - Appcelerator Studio: 3.1.2.201308021524 Titanium SDK: 3.1.2.v20130806104555 ACS: 1.0.5 Alloy: 1.2.0-alpha6 NPM: 1.3.2 Titanium: 3.1.2-alpha Titanium-code-processor: 1.0.2-alpha Android SDk Tools: 22.0.4 Device - Nexus7 (Android v4.2.1) Hence reopening this issue.
PR: https://github.com/appcelerator/titanium_mobile/pull/4556 For FR, please run the above test case, KS and Anvil(should be 370 passed / 36 failed).
3_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/4557
Verified with: Studio: 3.1.2.201308071912 SDK: 3.1.2.v20130807171139 acs:1.0.5 alloy:1.2.0-alpha6 titanium:3.1.2-alpha titanium-code-processor:1.0.2-alpha OS: OSX 10.8.4 Device: nexus 7(v4.3) Xcode:4.6.3 Closing as Fixed. PostLayout working as expected.
Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4967