INNER CODE UNIT · Kotlin
onBindViewHolder
mikepenz/FastAdapter · fastadapter/src/main/java/com/mikepenz/fastadapter/FastAdapter.kt:389
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int, payloads: List<Any>) {
//we do not want the binding to happen twice (the legacyBindViewMode
if (!legacyBindViewMode) {
if (verboseLoggingEnabled)
Log.v(TAG, "onBindViewHolder: " + position + "/" + holder.itemViewType + " isLegacy: false")
//set the R.id.fastadapter_item_adapter tag to the adapter so we always have the proper bound adapter available
holder.itemView.setTag(R.id.fastadapter_item_adapter, this)
//now we bind the item to this viewHolder
onBindViewHolderListener.onBindViewHolder(holder, position, payloads)
}
super.onBindViewHolder(holder, position, payloads)
}
/**
* Unbinds the data to the already existing ViewHolder and removes the listeners from the holder.itemView
*
* @param holder the viewHolder we unbind the data from
*/