Skip to content

Commit

Permalink
Merge pull request #4233 from salachi/TIMOB-13723-LongClickTwice
Browse files Browse the repository at this point in the history
[TIMOB-13723] LongClick fired for row, don't fire again
  • Loading branch information
ayeung committed Jun 5, 2013
2 parents 8cf8384 + 9d6199e commit 5465984
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -430,15 +430,17 @@ protected boolean rowClicked(TiBaseTableViewItem rowView, int position, boolean
}
event.put(TiC.EVENT_PROPERTY_SEARCH_MODE, adapter.isFiltered());

if(item.proxy != null && item.proxy instanceof TableViewRowProxy) {
boolean longClickFired = false;
if (item.proxy != null && item.proxy instanceof TableViewRowProxy) {
TableViewRowProxy rp = (TableViewRowProxy) item.proxy;
event.put(TiC.EVENT_PROPERTY_SOURCE, rp);
// The event will bubble up to the parent.
if (rp.hierarchyHasListener(eventName)) {
rp.fireEvent(eventName, event);
longClickFired = true;
}
}
if (longClick) {
if (longClick && !longClickFired) {
return itemLongClickListener.onLongClick(event);
} else {
return false; // standard (not-long) click handling has no return value.
Expand Down

0 comments on commit 5465984

Please sign in to comment.