[TIMOB-2431] Anroid: tabGroup open event not triggered
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:59:05.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M04 |
Components | Android |
Labels | android, defect, event, open, release-1.6.0, tabGroup, tabgroup |
Reporter | Jacob van Dam |
Assignee | Don Thorp |
Created | 2011-04-15T03:19:33.000+0000 |
Updated | 2011-04-17T01:59:05.000+0000 |
Description
The open event is never triggered in Android.
When you use this code nothing happens:
var win1 = Ti.UI.createWindow({});
var win2 = Ti.UI.createWindow({});
var tabGroup = Ti.UI.createTabGroup({
});
var tab = Titanium.UI.createTab({
window:win1,
title:'tab1'
});
var tab2 = Titanium.UI.createTab({
window:win2,
title:'tab2'
});
tabGroup.addTab(tab2);
tabGroup.addTab(tab);
tabGroup.addEventListener('open', function(){
Ti.API.error('tapGroup should be open!');
});
tabGroup.addEventListener('focus',function(){
Ti.API.error('Event triggered!');
});
tabGroup.open();
Attachments
File | Date | Size |
---|---|---|
ticket2431.zip | 2011-04-15T03:19:35.000+0000 | 4093173 |
responsible:"Don Thorp"
[responsible:"Don Thorp"]
[tagged:android tagged:tabGroup tagged:event tagged:open]
You'll probably want to use open on the windows, not the tab group as a workaround. Windows are lazily loaded.
The window event is triggered before the tabgroup is shown. So this isn't a solution for me.
Triage please.
(from [894bbc962dd88319c4d9eb100c1ff141f0885cea]) [#2431 state:fixed-in-qa] Fire open event when TabGroup is opened.
Added firing of open event to handlePostOpen()
https://github.com/appcelerator/titanium_mobile/commit/894bbc962dd88319c4d9eb100c1ff141f0885cea"> https://github.com/appcelerator/titanium_mobile/commit/894bbc962dd8...
Please verify the fix with the attached app which just wraps the above example code.
Upon launching, you should see both events received in the log.
Thanks
Opie
[INFO] Titanium SDK version: 1.6.0 (01/10/11 08:25 3452f06) g1 (1.6) and droid 1 (2.2.1) emulator running 2.1. Thanks for test content!