ShamylZakariya / StickyHeaders

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

Add support for stable ids #83

Closed gosoares closed 5 years ago

gosoares commented 6 years ago

In my project, i have to provide the Itens ids to recycler view, and a did something like:

override fun getItemId(position: Int) : Long {
        val section = getSectionForAdapterPosition(position)
        val item = getPositionOfItemInSection(section, position)
        ...
        return id
}

With this update, it became simpler, because it already provides section and item indexes. Sorry if it have some grammar errors, i am still learning english.

ShamylZakariya commented 5 years ago

This looks like a good idea, but I'd like to see en example of it in use before adding more complexity.