Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-7008

Android: tableViewRow - longpress event does not fire on TableViewRow

    Details

      Description

      Problem

      Adding the eventListener of longpress to a TableViewRow does not fire the event.

      Test Case

      Make a project with the below app.js. Long press on the row and notice that the event never fires.

      app.js

      var win1 = Titanium.UI.createWindow({backgroundColor:'#000000'});
       
      var row = Titanium.UI.createTableViewRow({height:'auto'});
      var view = Titanium.UI.createView({backgroundColor:'red',width:'90%',height:'100%'});
      row.add(view);
      row.addEventListener('longpress', TableViewRowLongPress);
       
      var table = Titanium.UI.createTableView();
      table.appendRow(row);
      win1.add(table);
       
      function TableViewRowLongPress(evt)
      {
        Ti.API.info('****TableViewRow longpress');
      }
       
      win1.open();
      

      More Information

      The above Test Case is not normally how we add data to a TableView. When assigning the data property of the TableView to an array you do not have access to the TableViewRow to attach a longpress listener. What would really be nice is to have the longpress event handled by the TableView itself and have the same information passed in the evt parameter as the click event (ie. row, rowData).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vduggal Vishal Duggal (Inactive)
                Reporter:
                jlbarnhart Jon Barnhart
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-11592
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration