0

I want a view called view called tableview in my project from the GitHub. It is a view like data grid in the window and it can set every column has the different view, when I put a checkbox into the tableview, the click event of the item disappear, like this:

[enter image description here

If every column is a TextView, the click event is usually like this: 

the Textview in the tableview)

I think maybe because the checkbox consumes the click event, so the click of the item doesn't have any effort. But the click of the area doesn't within the area of the checkbox, I don't know how to deal with the problem.

When I put a checkbox into a RecycleView, the item of the RecycleView works.

enter image description here

It is strange to me why the RecycleView can do it, but the TableView can't do it.

I need some guidance please.

clemens
  • 16,716
  • 11
  • 50
  • 65

1 Answers1

1

Just add these properties to checkbox:

android:focusable="false"
android:focusableInTouchMode="false"
JaLoveAst1k
  • 512
  • 3
  • 14