Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15853] Android: 'postlayout' event fired twice for 'Button','Label','Window'

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.1.3
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterShameer Jan
AssigneeUnknown
Created2013-12-02T09:47:25.000+0000
Updated2018-02-28T20:04:12.000+0000

Description

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();

Comments

No comments

JSON Source