Reputation: 31
How do I implement onItemLongClick
and onItemClick
for a GridView so that GridView items respond to both events?
Upvotes: 3
Views: 3260
Reputation: 479
I found that the trick is in the return value of the longclick listener call back. If you return true, onclick
will not be called after the longclick is called and simple click will invoke only onclick
. It worked fine for me.
Upvotes: 19