getHeaderPositionForItem

abstract fun getHeaderPositionForItem(itemPosition: Int): Int

This method gets called by HeaderItemDecoration to fetch the position of the header item in the adapter that is used for (represents) item at specified position.

Return

int. Position of the header item in the adapter.

Parameters

itemPosition

int. Adapter's position of the item for which to do the search of the position of the header item.