AndroidTreeView icon indicating copy to clipboard operation
AndroidTreeView copied to clipboard

Update Node

Open lakshanherath opened this issue 7 years ago • 3 comments

I want to update existing node in the tree view . And i want to change the text color and change image in that node in my customAdapter.

Can you help me.

lakshanherath avatar Aug 22 '17 07:08 lakshanherath

Anybody have answer to this? If i create a node like this TreeNode nodeItem = new TreeNode("Hello").setViewHolder(new SelectableItemHolder(this));

This creates a node with the text set to "Hello", but what if i want to change "Hello" to "Goodbye" else later, there is no function to do that! Also mValue inside TreeNode is read only, and there is no way to set it to a new value.

nsmith1024 avatar Nov 26 '17 03:11 nsmith1024

I ended up changing the properties (Views) of the view holder directly since there is no way to edit the data of a TreeNode and "refresh" the view holder layout.

So I'm just changing the views from the callbacks inside either network requests or onClickListeners, handling the changed manually

lpbas avatar Dec 14 '17 10:12 lpbas

you change your node color in toggleSelectionMode method which is ovrrided in adapter.simply use your view & uset setTextcolor method which is default of android.

Neha1405 avatar Dec 31 '17 11:12 Neha1405