onItemClick wrong position
Closed this issue · 2 comments
AlexeyFreelancer commented
Hi @felipecsl
Maybe I'm wrong, but I think OnItemClickListener works incorrect:
position=0 for header
position=1 for first list item
So, should I manually decrement position into the onItemClick()?
felipecsl commented
@AlexeyFreelancer you're right. The click listener needs to be offset because of the exta item(s) added at the top. For now you can use (position - 1) if you're using a listView, or (position - numColumns) for gridView. I will submit a fix shortly. Thanks for reporting!
felipecsl commented
Please keep in mind the onItemClick()
view
and id
arguments will still be referring to the wrong item. Only the position
is fixed. Also, you have to attach the onItemClickListener via the QuickReturnAttacher
, just like the onScrollListener
.