Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

binding issue #4

Open
Gk160 opened this issue May 12, 2022 · 0 comments
Open

binding issue #4

Gk160 opened this issue May 12, 2022 · 0 comments

Comments

@Gk160
Copy link

Gk160 commented May 12, 2022

override fun onBindViewHolder(holder: ToDoViewHolder, position: Int) {
val curToDo = todos[position]
holder.itemView.apply {
tvTodoTitle.text = curToDo.Title
cbDone.isChecked = curToDo.isChecked
toggleStrikeThrough(tvTodoTitle, curToDo.isChecked)
cbDone.setOnCheckedChangeListener { _, isChecked ->
toggleStrikeThrough(tvTodoTitle, isChecked)
curToDo.isChecked = !curToDo.isChecked
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant