AmrDeveloper / TreeView

Multi roots TreeView :palm_tree: implementation for Android Platform with a lot of options and customization
https://amrdeveloper.github.io/TreeView/
MIT License
177 stars 24 forks source link

multi-select function #3

Open Ag-gu opened 2 years ago

Ag-gu commented 2 years ago

Hi! First of all thank you for open source such a useful component. In the process of using it, I added the checkbox myself, and wanted to support the check function, but because of my limited level, there were many problems in the process of customization. Will the multi-select function be added in the future?

AmrDeveloper commented 2 years ago

Hello @Ag-gu,

Thanks for your review, I am thinking of enabling multi selection without extra functions, just a new flag that enable/disable this feature and in the view holder you can know If this node is selected or not, this feature will be added in the future and in a simple API Design too, enjoy it

Thanks Amr Hesham

Ag-gu commented 2 years ago

Thank you for your reply, I will continue to pay attention to this project, I hope to experience this function as soon as possible, and look forward to more and more practical functions.

Ag-gu commented 2 years ago

@AmrDeveloper I would like to ask a question, if I want to add a child node to an item when I click it and display it in real time, where should I operate it? Now if I add a child node when I click it, the child node will only be rendered when I click it a second time.

AmrDeveloper commented 2 years ago

Hello @Ag-gu,

You need to notify the adapter by position if you know it or notify in general, later I will provide functions to manage nested add and remove

Thanks Amr Hesham

softsan commented 1 year ago

@AmrDeveloper is the multi select feature available?

AmrDeveloper commented 1 year ago

@softsan Sorry for delay, not supported yet, i am planning to support it without changing public api