bmelnychuk / AndroidTreeView

AndroidTreeView. TreeView implementation for android
Apache License 2.0
2.99k stars 618 forks source link

Prevent margin clicks from going to the parent node #151

Open cimugbit opened 6 years ago

cimugbit commented 6 years ago

Thank you for this great library! When using version 1.2.9 of it I noted that clicks in the indentation area of child nodes go to the parent node, normally collapsing it. I found this behavior not correct, so in commit 68a5d1c I changed the code to attach the handlers to the nodeView instead of the nodeWrapperView. I found it easiest to achieve this by using two additional methods in BaseNodeViewHolder, but there might be better ways to achieve the same result.

In my second commit ac5b9a7 I corrected a typo in one of your method names. Feel free to ignore it if it breaks compatibility with existing code too much.