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

Initially tree is expanded but isExpanded() is set to false leading to a minor bug #17

Open DrHowdyDoo opened 8 months ago

DrHowdyDoo commented 8 months ago

Describe the bug When the tree is shown for the first time, it is all expanded but the treeNode class has a false set in isExpanded variable, because of this when you tap on the node it expands again replicating it's childrens.

To Reproduce Steps to reproduce the behavior:

  1. Just create a Tree with atleast 3 child'
  2. Expand the First Node
  3. you will see duplicate child node

Expected behavior Either the tree should be collapsed from the start or isExpanded should be set to true.

Screenshots Screenshot_20240315-171009(marked)

Screenshot_20240315-171001

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

AmrDeveloper commented 8 months ago

@DrHowdyDoo Thank you for reporting i will check and fix it

AmrDeveloper commented 8 months ago

Hello @DrHowdyDoo,

I am trying to reproduce it with FileTreeFragment example using

treeViewAdapter.expandNode(javaDirectory);

Can you please write simple code to reproduce it or write instruction to used it in FileTreeFragment

DrHowdyDoo commented 8 months ago

I am not using any FileTreeFragment .

AmrDeveloper commented 8 months ago

I know i mean we need to create snippet of code to reproduce tge issue

DrHowdyDoo commented 8 months ago

can you see it in my github project ?? it's in progress and i am facing couple of bugs in the treeview. Like duplication of child views and expand all does not expand all child nodes if some were collapsed before expanding all My GitHub Repo

AmrDeveloper commented 7 months ago

can you see it in my github project ?? it's in progress and i am facing couple of bugs in the treeview. Like duplication of child views and expand all does not expand all child nodes if some were collapsed before expanding all My GitHub Repo

Good i will check it and fix them

AmrDeveloper commented 7 months ago

@DrHowdyDoo Your idea is cool i installed the app but i clicked on many apps components and the app show no tree or info.

Any tips on how to use it to debug the issue

Thanks

DrHowdyDoo commented 7 months ago

You have to set the app as digtal assistant and then invoke it like you do with google assistant to make it work.

DrHowdyDoo commented 7 months ago

if it does not show anything remove it as your digital assistant and then set it again

AmrDeveloper commented 7 months ago

It's not working on my real device, i will try emulator

DrHowdyDoo commented 7 months ago

Try installing the apk from the repo releases section. i have put layout_inspector_v1.0 apk there.