This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MobileListAdapterStrategy<T : Any, VH : RecyclerView.ViewHolder>( | |
override val adapter: RecyclerView.Adapter<VH>, | |
private val diffCallback: DiffUtil.ItemCallback<T> | |
) : ListAdapterStrategy<T, VH> { | |
private val listAdapter = object : ListAdapter<T, VH>(diffCallback) { | |
fun getItemWithPosition(position: Int) = getItem(position) | |
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): VH { | |
return this.onCreateViewHolder(parent, viewType) | |
} |
OlderNewer