mikepenz/FastAdapter

[Question] PreLongClick / PreClick listeners

Closed this issue · 2 comments

I just realized MultiselectSampleActivity uses two mysterious undocumented features : mFastAdapter.onPreClickListener and mFastAdapter.onPreLongClickListener that look quite powerful (and much simpler than what I'm using myself to recreate the same behaviour)

I have a vague idea about how they should be used, but I'd rather ask you directly.

Would it be possible to document that API, as well as its interaction with the actual click / longClick events ?

Thanks a lot in advance~

The idea behind those listeners was to provide a way to act on a click event before it is passed along to inner functions of the library. E.g. prevent behaviour of the select or expandable extensions.

Similar to the other listeners you have the possibility to do something with the event at the time, and based on your logic then to either consume the event (by returning true), or to allow passing it further by returning false (e.g. not consuming it)

Beyond that there's actually no further funcionality to those.

That's exactly what I needed and it was there all this time... Thanks for the info !