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

Android: ListView properties missing in "longpress" event in Alloy as of 9.3.0



      When using the "longpress" event on the Android ListView in 9.3.0+, the itemIndex / sectionIndex are not supplied via the event when the longpress occured on a child view of the list item template. I don't have an isolated test case so far, but it should be reproducible on any custom-templates test case that adds the "longpress" event to the view wrapper.

      The same used to work on both iOS and Android. What I can share immediately is the Alloy sample:

      	<ListView id="listView" defaultItemTemplate="MyCell">
      			<ItemTemplate name="MyCell">
      				<View height="43" onLongpress="onLongPress">
      					<ImageView bindId="image" />
      					<Label bindId="titleLabel" />

      Important to note is that the longpress event is added to the item template, not the list view itself as this used to be the only way to handle this. If there are better ways, let me know!

      EDIT: Just checked it: The longpress event does not work on the ListView at all (like the itemclick and others), so the above is the only feasible workaround thats now also broken




            • Assignee:
              gmathews Gary Mathews
              hknoechel Hans Knöchel
              Joshua Quick
              Lokesh Choudhary
            • Watchers:
              5 Start watching this issue


              • Created:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration