GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-09-11T04:22:29.000+0000 |
Affected Version/s | Release 2.1.0, Release 2.0.1 |
Fix Version/s | Sprint 2012-13 Core, Release 3.0.0 |
Components | Android |
Labels | core, module_tableview, parity, qe-review, qe-testadded |
Reporter | Federico Casali |
Assignee | Max Stepanov |
Created | 2012-06-19T13:26:39.000+0000 |
Updated | 2013-12-10T06:12:05.000+0000 |
Problem description
'postlayout' event is not fired on Android
Sample code to reproduce
Run the sample code below. 'postlayout' event it's not fired only on Android OS.
iOS works fine.
var win = Ti.UI.createWindow({
backgroundColor:'white',
title:'test',
modal:true
});
var data1 = [];
var tvr = Ti.UI.createTableViewRow({
title:'pippo',
hasChild:true
});
data1.push(tvr);
var table = Ti.UI.createTableView({
top: 10,
left: 10,
width: 200,
height: 200,
scrollable: false,
borderRadius: 10,
backgroundColor: 'white',
data : data1
});
table.addEventListener('postlayout', function() {
setTimeout(function(){
Ti.API.info('#### postlayout table event received.');
alert('postlayout table event fired');
},600);
});
win.add(table);
win.open();
PR pending https://github.com/appcelerator/titanium_mobile/pull/2467
Still doesn't work as expected for window. Before, "postlayout" event wasn't fired, now it's being fired twice. Here is my test case:
Tested on Android 3.1 device with latest CI build.
Ivan, the behavior you describe is unrelated to this ticket. I tested your example before (which is current master) and after (after applying PR 2467), it behaves identically by double firing postlayout. Please create a separate JIRA.
Closing as fixed. Tested and verified on: Titanium Studio, build: 2.1.2.201208201549 Titanium SDK, build: 2.2.0.v20120824175712 Devices: Nexus S (4.1.1), HTC Evo (4.0.3)
Reopening to update labels
Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/5003