Skip to content

How to update dynamically the AndroidTreeView or node information? #189

Description

@YuQi9797

Hello Sir or Madam,

I have a question about how to update dynamically the AndroidTreeView or node?

I get the data node structure from the Internet, sometimes I need to refresh to get the node structure information again, is there any way to update my node information?

my code like this:

    private void initTreeView() {
        TreeNode treeRoot = TreeNode.root();

        loadTreeDataFromAssets(treeRoot);  // A custom method to get the data and create a corresponding node.

        treeView = new AndroidTreeView(this, treeRoot);
        
        treeView.setDefaultAnimation(true);
        treeView.setDefaultContainerStyle(com.unnamed.b.atv.R.style.TreeNodeStyle);
        treeView.setDefaultViewHolder(IconTreeItemHolder.class);
        mBinding.treeContainer.addView(treeView.getView());
    }

but when I refresh to get the node structure information again, what can I do to update my AndroidTreeView to display this one?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions