Project: titanium
Issue TIMOB-13914: Android: 'longpress' event is not working in ListView
'longpress' event is not working in listView. Here is the test case: {code} var win = Ti.UI.createWindow({backgroundColor: 'white'}); var plainTemplate = { childTemplates: [ { type: 'Ti.UI.Label', // Use a label bindId: 'rowtitle', // Bind ID for this label properties: { // Sets the Label.left property left: '10dp' } }, { type: 'Ti.UI.ImageView', // Use an image view bindId: 'pic', // Bind ID for this image view properties: { // Sets the ImageView.image property	image: 'KS_nav_ui.png' } }, { type: 'Ti.UI.Button', // Use a button bindId: 'button', // Bind ID for this button properties: { // Sets several button properties width: '80dp', height: '30dp',	right: '10dp', title: 'press me' } } ] }; function report(e) {	Ti.API.info(e.type); } var listView = Ti.UI.createListView({ // Maps the plainTemplate object to the 'plain' style name templates: { 'plain': plainTemplate }, // Use the plain template, that is, the plainTemplate object defined earlier // for all data list items in this list view defaultItemTemplate: 'plain' }); var data = []; for (var i = 0; i < 3; i++) { data.push({ // Maps to the rowtitle component in the template // Sets the text property of the Label component rowtitle : { text: 'Row ' + (i + 1) }, // Sets the regular list data properties properties : { itemId: 'row' + (i + 1), accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_NONE } }); } listView.addEventListener('longpress', function(e){ alert("longpress fired!!!"); }); win.add(listView); win.open(); {code}
Story points: 5