AndroidTreeView
AndroidTreeView copied to clipboard
Update Node
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.
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.
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
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.