INNER CODE UNIT · Kotlin
onDetachedFromRecyclerView
mikepenz/FastAdapter · fastadapter/src/main/java/com/mikepenz/fastadapter/FastAdapter.kt:452
override fun onDetachedFromRecyclerView(recyclerView: RecyclerView) {
logger.log("onDetachedFromRecyclerView")
super.onDetachedFromRecyclerView(recyclerView)
}
/**
* Searches for the given item and calculates its global position
*
* @param item the item which is searched for
* @return the global position, or [androidx.recyclerview.widget.RecyclerView.NO_POSITION] (-1) if not found
*/
open fun getPosition(item: Item): Int {
if (item.identifier == -1L) {
Log.e(TAG, "You have to define an identifier for your item to retrieve the position via this method")
return RecyclerView.NO_POSITION
}
return getPosition(item.identifier)
}