TreeView icon indicating copy to clipboard operation
TreeView copied to clipboard

CheckBox

Open panliang-rm opened this issue 1 year ago • 3 comments

Whether i can check the parent node, all its child nodes will be checked. treeView

panliang-rm avatar Jul 08 '24 07:07 panliang-rm

Hello @panliang-rm,

Sorry for delay, do you still have a code snippets on how to reproduce it

AmrDeveloper avatar Dec 25 '24 12:12 AmrDeveloper

Hello, this is an example I found online. I want to ask if TreeView can provide checkbox functionality. Currently, my implementation is quite complex and not elegant - I need to manually traverse the data source and use EventBus to notify updates.

panliang-rm avatar Dec 26 '24 07:12 panliang-rm

@panliang-rm Yes, TreeView allow you to define your custom view with custom logic too, I created a small example with CheckBox component

https://github.com/AmrDeveloper/TreeView/tree/master/app/src/main/java/com/amrdeveloper/treeviewlib/todotree

https://github.com/user-attachments/assets/5f98123c-d0a2-4ba4-90d5-65c0cbb094fe

You can also decide if you want to check the parent if all children are checked or not

AmrDeveloper avatar Dec 26 '24 13:12 AmrDeveloper