ShamylZakariya / StickyHeaders

Adapter and LayoutManager for Android RecyclerView which enables sticky header positioning.
MIT License
1.4k stars 185 forks source link

Get current visible item on screen #19

Closed albertorusso90 closed 8 years ago

albertorusso90 commented 8 years ago

Hi, is there a way to find out which item (that is not a section header) is currently being displayed on the screen?

Thanks in advance

ShamylZakariya commented 8 years ago

No but it would not be hard to implement. Would your preferred use of this method return the adapter position of the first (non-header) item? Or the associated ViewHolder?

albertorusso90 commented 8 years ago

oh thats great that you would implement this. For me it would be best if it returned the ViewHolder of the first (non-header) item

ShamylZakariya commented 8 years ago

OK, so I'm going sailing this weekend, will not be coding. But since this seems like a useful feature which won't break anything to add or otherwise change behavior, I'll see about doing this early next week.

ShamylZakariya commented 8 years ago

This is implemented: https://github.com/ShamylZakariya/StickyHeaders/releases/tag/v0.7.2