Skip to content

Instantly share code, notes, and snippets.

@manoj-mili
Created August 16, 2020 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manoj-mili/c3745d50e590a3c1c9ab8109c62b4644 to your computer and use it in GitHub Desktop.
Save manoj-mili/c3745d50e590a3c1c9ab8109c62b4644 to your computer and use it in GitHub Desktop.
BindViewHolder implementation
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
//to access data from list we have getItem(position) and no need to implement
val task = getItem(position)
holder.tvDesc.text = task.body
holder.tvTitle.text = task.title
}
//Also no need to implement getItemCount()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment