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

How can keep state of tree with navigation when back? #9

Open minhson95th opened 1 year ago

minhson95th commented 1 year ago

I want to keep state of tree after back from another fragment. How can i do? I use with Android Navigation Component

https://user-images.githubusercontent.com/46039866/221523310-77ae7b42-ee29-4c19-a304-b0b42346d49b.mp4

Capture1

AmrDeveloper commented 1 year ago

Hello @minhson95th,

For now, you need to save and restore the nodes because the state is on each TreeNode object, maybe we can find a better solution that easy to use and not effect the performance

Thank you Amr Hesham

minhson95th commented 1 year ago

Hello @minhson95th,

For now, you need to save and restore the nodes because the state is on each TreeNode object, maybe we can find a better solution that easy to use and not effect the performance

Thank you Amr Hesham

Do you have any solution?

AmrDeveloper commented 1 year ago

@minhson95th Still thinking of good solution that can be part of the library