Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. class ViewHolder(view: View, val action: ((Item) -> Unit)? = null) : RecyclerView.ViewHolder(view) {
  2. fun bind(item: Item) {
  3. itemView.setOnClickListener { action?.invoke(item) }
  4. }
  5. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement