Problem Description
Steps to reproduce
1.Run following code
Expected result:
postlayout event should be fire once for button, label and window
Actual result:
postlayout event fired twice for button, label, and window
Test case
var win = Ti.UI.createWindow({
backgroundColor: '#000',
layout: 'vertical',
navBarHidden: true
});
var button = Ti.UI.createButton({
title: 'Test'
});
win.add(button);
var label = Ti.UI.createLabel({ text: 'Something ...', height: Ti.UI.SIZE, width: Ti.UI.FILL });
win.add(label);
button.addEventListener('postlayout', function(e) {
Ti.API.info('Button postlayout');
});
label.addEventListener('postlayout', function(e) {
Ti.API.info('Label postlayout');
});
win.addEventListener('postlayout', function(e) {
Ti.API.info('Window postlayout');
});
win.open();
No comments