Coming from a Java background I am used to dealing with actions though I’m not really sure why the method requires a boolean is returned and don’t fully understand the explanation given on the site: true if the callback consumed the long click, false otherwise.
Share
As you may know, the
Viewhierarchy in Android is represented by a tree. When you returntruefrom theonItemLongClick()– it means that theViewthat currently received the event is the true event receiver and the event should not be propagated to the otherViewsin the tree; when you returnfalse– you let the event be passed to the otherViewsthat may consume it. Hope this helps.