AndroidTreeView icon indicating copy to clipboard operation
AndroidTreeView copied to clipboard

setExpand node after addChildren

Open abrahamputraprakasa opened this issue 8 years ago • 3 comments

is it possible to expand the node after addChildren called?

My function is running on async task to load the child from webservice and when post execute I call

node.addChildren(child); node.setExpand(true);

but it not expanded but when first I click the node its already expanded, so after post execute I need to press once to contract it, and then press once again to expand the new populated child.

Any solution will be appreciated, Thanks.

abrahamputraprakasa avatar May 17 '16 11:05 abrahamputraprakasa

You can use node.getLevel to get the level of node. Then use node.expandLevel .

mkjangid avatar May 17 '16 13:05 mkjangid

Sorry but I cannot find expandLevel function, can you give some example? node is TreeNode object by the way Thanks before.

abrahamputraprakasa avatar May 17 '16 13:05 abrahamputraprakasa

Have you solved the problem?My question is the same as yours,thank you very much!

bujinhai avatar Aug 06 '17 08:08 bujinhai