[TIMOB-1427] Android 2.2: TableViewRow click event not firing
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:56:09.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 |
Components | Android |
Labels | android, defect, tableviewrow |
Reporter | Michael Hoisie |
Assignee | Don Thorp |
Created | 2011-04-15T02:52:04.000+0000 |
Updated | 2011-04-17T01:56:09.000+0000 |
Description
I expect to get some kind of alert, but nothing fires. According to the docs, the click events should work.
Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({
title:'TiFourgen',
backgroundColor:'#000'
});
var text = 'Document 1';
var table = Ti.UI.createTableView({});
win.add(table);
for (var i = 0; i < 10; i++) {
var row = Ti.UI.createTableViewRow({
height: 100,
className: 'document',
touchEnabled: true
});
row.addEventListener('click',function()
{
alert("row click!");
});
var label = Titanium.UI.createLabel({
text: text,
width:200,
height:150,
top:10,
color:'#336699',
font:{fontSize:16, fontStyle:'italic'},
textAlign:'left',
touchEnabled: true,
backgroundColor:'#ffffff'
});
label.addEventListener('click',function()
{
alert("label click!");
});
row.add(label);
table.appendRow(row);
}
win.open();
Confirmed. Also pre-2.2, AFAICT.
(from [8fa74758d1ecb7c3082bc771b44ea8f86a6a5c8c]) [#1427 state:fixed-in-qa] Detect if row has a click listener and fire it. If the tableview has a listener that will fire as well. http://github.com/appcelerator/titanium_mobile/commit/8fa74758d1ecb7c3082bc771b44ea8f86a6a5c8c"> http://github.com/appcelerator/titanium_mobile/commit/8fa74758d1ecb...
confirmed on a nexus 1 (2.2) and a g1 (1.6), ipod touch (4.1)