RecyclerSectionItemDecoration

class RecyclerSectionItemDecoration(headerOffset: Int, sticky: Boolean, sectionCallback: RecyclerSectionItemDecoration.SectionCallback, headerViewID: Int, sectionHeaderLayoutName: Int) : RecyclerView.ItemDecoration

/* USAGE val sectionItemDecoration = RecyclerSectionItemDecoration(resources.getDimensionPixelSize(R.dimen.recycler_section_header_height), false, // true for sticky, false for not, R.id.list_item_section_text, R.layout.section_header object : RecyclerSectionItemDecoration.SectionCallback {

override fun isSection(position: Int): Boolean { return position == 0 || listposition.name0 != listposition-1.surname0 }

override fun getSectionHeader(position: Int): CharSequence { return listposition.name.subSequence(0, 1) } }) recyclerView.addItemDecoration(sectionItemDecoration) / /

*/

Constructors

Link copied to clipboard
constructor(headerOffset: Int, sticky: Boolean, sectionCallback: RecyclerSectionItemDecoration.SectionCallback, headerViewID: Int, sectionHeaderLayoutName: Int)

Types

Link copied to clipboard
interface SectionCallback

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun onDrawOver(c: Canvas, parent: RecyclerView, state: RecyclerView.State)