Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class NoteListAdapter(
- private val notes: MutableList<Note>,
- private val context: Context,
- private var onItemClickListener: (note: Note, position: Int) -> Unit) : Adapter<NoteListAdapter.ViewHolder>() {
- override fun onBindViewHolder(holder: ViewHolder?, position: Int) {
- val note = notes[position]
- holder?.let {
- it.bindView(note)
- it.itemView.setOnClickListener {
- onItemClickListener(note, position)
- }
- }
- }
- // restante do código
- }
Add Comment
Please, Sign In to add comment