Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2431] Anroid: tabGroup open event not triggered

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:59:05.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M04
ComponentsAndroid
Labelsandroid, defect, event, open, release-1.6.0, tabGroup, tabgroup
ReporterJacob van Dam
AssigneeDon Thorp
Created2011-04-15T03:19:33.000+0000
Updated2011-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

FileDateSize
ticket2431.zip2011-04-15T03:19:35.000+00004093173

Comments

  1. Jacob van Dam 2011-04-15

    responsible:"Don Thorp"

  2. Jacob van Dam 2011-04-15

    [responsible:"Don Thorp"]

  3. Jacob van Dam 2011-04-15

    [tagged:android tagged:tabGroup tagged:event tagged:open]

  4. Don Thorp 2011-04-15

    You'll probably want to use open on the windows, not the tab group as a workaround. Windows are lazily loaded.

  5. Jacob van Dam 2011-04-15

    The window event is triggered before the tabgroup is shown. So this isn't a solution for me.

  6. Don Thorp 2011-04-15

    Triage please.

  7. Opie Cyrus 2011-04-15

    (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...

  8. Opie Cyrus 2011-04-15

    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

  9. Thomas Huelbert 2011-04-15

    [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!

JSON Source