Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4063] Android: TabGroup: most events not do not fire (only focus works)

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-11-12T22:59:12.000+0000
Affected Version/sRelease 1.7.5, Release 1.8.0, Release 1.8.0.1, Release 3.0.0
Fix Version/sRelease 2.1.0, Sprint 2012-08, Release 3.0.0, Release 3.1.0, 2012 Sprint 21 API, 2012 Sprint 21
ComponentsAndroid
Labelsapi, module_tabgroup, parity, qe-and100112, qe-testadded, regression
ReporterPaul Dowsett
AssigneeHieu Pham
Created2011-05-12T18:08:40.000+0000
Updated2013-06-11T18:09:32.000+0000

Description

Environment: * TiStudio Preview * Android 2.3.3 * Titanium SDK (all versions) The following code demonstrates that only the focus event is fired for tabGroups:
Titanium.UI.setBackgroundColor('#000');

var tabGroup = Titanium.UI.createTabGroup();

var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({  
    title:'Tab 1',
    window:win1
});

var label1 = Titanium.UI.createLabel({
	color:'#999',
	text:'I am Window 1'
});

win1.add(label1);

var win2 = Titanium.UI.createWindow({  
    title:'Tab 2',
    backgroundColor:'#fff'
});
var tab2 = Titanium.UI.createTab({  
    title:'Tab 2',
    window:win2
});

var label2 = Titanium.UI.createLabel({
	color:'#999',
	text:'I am Window 2'
});

win2.add(label2);

tabGroup.addTab(tab1);  
tabGroup.addTab(tab2);  

tabGroup.open();

label1.addEventListener("click", function(){
  Ti.API.info("label1 click event fired!");
});

tabGroup.addEventListener("click", function(){
  Ti.API.info("tabGroup click event fired!");
});

tabGroup.addEventListener("dblclick", function(){
  Ti.API.info("tabGroup dblclick event fired!");
});

tabGroup.addEventListener("doubletap", function(){
  Ti.API.info("tabGroup doubletap event fired!");
});

tabGroup.addEventListener("focus", function(){
  Ti.API.info("tabGroup focus event fired!");
});
tabGroup.addEventListener("swipe", function(){
  Ti.API.info("tabGroup swipe event fired!");
});

Comments

  1. Hieu Pham 2012-04-11

    Testing steps: 1. Click anywhere on the tabGroup, you should see a log 2. Double click anywhere on the tabGroup, you should see 2 click events, 1 double-click, 1 double-tap 3. Make sure you click on the tabs also, not just the window
  2. Payminder Singh 2012-06-23

    Titanium Studio: 2.1.0.201206221045 Mobile SDK: 2.1.0.v20120622174154 OS: X Lion Device: Samsung Galaxy Can't reproduce. Every single tap and double tap are working on whole window space and on top "Tab1" and "Tab2" buttons. Events fire display in DDMS.
  3. Neha Chhabra 2012-07-12

    Reopening to update labels.
  4. Tamila Smolich 2012-10-10

    Reopening the issue. Only focus event fired. Also adding a "regression" label, since this behavior does not occur on 2.1.3. Tested on: OS: Mac OS X Lion 10.7.4 Titanium Studio, build: 3.0.0.201210090117 Titanium SDK, build: 3.0.0.v20121010130117 Device: Samsung Galaxy III (4.0.4)
  5. Hieu Pham 2012-10-13

    3.0.X PR : https://github.com/appcelerator/titanium_mobile/pull/3202 Master PR: https://github.com/appcelerator/titanium_mobile/pull/3184
  6. Tamila Smolich 2012-10-17

    Closing as fixed. Verified and tested on: Titanium Studio, build: 3.0.0.201210151149 Titanium SDK, builds: 3.0.0.v20121017100120; 3.1.0.v20121017102121 Device: Nexus 7 (4.1.1)
  7. Tamila Smolich 2012-10-17

    Reopening to make changes in comment
  8. Ping Wang 2012-11-12

    PR is already merged in 3_0_X and master. Reopen to modify the label and fix version.

JSON Source