Skip to content

Instantly share code, notes, and snippets.

@jungilhan
Created May 11, 2018 02:48
Show Gist options
  • Save jungilhan/7ab43092c0a09e362a2d4772487fe661 to your computer and use it in GitHub Desktop.
Save jungilhan/7ab43092c0a09e362a2d4772487fe661 to your computer and use it in GitHub Desktop.
class NumberViewHolder(parentView: View) : RecyclerView.ViewHolder(
LayoutInflater.from(parentView.context).inflate(R.layout.card_item, null, false)) {
private val numberView = itemView.findViewById<TextView>(R.id.number)
fun bindTo(position: Int) {
numberView.text = "# $position"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment