Handling "click/selection" and "expansion" separately
Imagine if the tree was used to display a list of hierarchical folders. In such a view, clicking on a node should allow us to take an action as though that node was selected, and expanding the node to show its children should only be done if the user click on an expand icon next to folder name.
The Demo Application has a Folder view demo, but that only allows clicking (selecting?) the leaf nodes. If a node has children, it cannot be selected, and only expanded.
Is there a way to achieve this effect?
I think you can achieve this with treeView.setUseAutoToggle(false) and then custom click listener to the arrow just like in the sampe app ArrowExpandSelectableHeaderHolder.java
@bmelnychuk Thank you for your response. I actually was hoping for such a method to exist so I could do exactly that. But TreeView does not have a method called setUseAutoToggle --- do I need to fork and create it or am I missing something?
Ohh, I did not update version in central, will do asap
@bmelnychuk Thanks - looking forward to new version update..Hopefully soon :)
HI @bmelnychuk sorry to bug you - but just wanted to check if you had a chance to upload the latest ?
thanks
Isn't it available in version 1.2.8?
@bmelnychuk Does not seem to be in 1.2.8
@bmelnychuk By the way, it does seem to be present in the latest code on Github. It just doesn't seem to be in the latest available dependency version. So it needs to be built and pushed out ?
I will do this today
Ok, version 1.2.9 is available, sorry for delay
@bmelnychuk Thank you - it works as advertised now :D