Coder Social home page Coder Social logo

Comments (5)

bmelnychuk avatar bmelnychuk commented on August 21, 2024

Maybe you can take a look at 'Folder Structure Example' from demo app. There is '+' button with custom listener, can you reuse it?

from androidtreeview.

limulidae avatar limulidae commented on August 21, 2024

Could you please point out where is the listener you are saying?
I tried two listeners, both are not working.
Click the node and the node still collapse.
I want it always open.

        tView.setDefaultNodeClickListener(new TreeNode.TreeNodeClickListener() {
            @Override
            public void onClick(TreeNode treeNode, Object o) {
            }
        });

            parent.setClickListener(new TreeNode.TreeNodeClickListener() {
                @Override
                public void onClick(TreeNode treeNode, Object o) {
                    DateIconTreeItem item = (DateIconTreeItem) o;
                    int pos = item.position;
                    mUi.scrollable_view.scrollToPosition(pos);
                }
            });

from androidtreeview.

limulidae avatar limulidae commented on August 21, 2024

and, I try your app,
Clicking the node will collapse its children nodes.

from androidtreeview.

bmelnychuk avatar bmelnychuk commented on August 21, 2024

Oh, now I understand your problem. Such behavior is not supported yet, it is very easy to fix in library, I can add this on weekends

from androidtreeview.

cvelasco88 avatar cvelasco88 commented on August 21, 2024

Hi, I had the same problem.

My solution is to set the status of expanded inverted than the node has.

// node.setExpanded(!node.isExpanded());

it solves the problem because the node will expand when is expanded, but with a ugly delay.

It shall be better something like "return true/false" to manage this. I am waiting for this issue too.

Regards.

from androidtreeview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.