{"action":"created","issue":{"url":"https://api.github.com/repos/bmelnychuk/AndroidTreeView/issues/2","labels_url":"https://api.github.com/repos/bmelnychuk/AndroidTreeView/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/bmelnychuk/AndroidTreeView/issues/2/comments","events_url":"https://api.github.com/repos/bmelnychuk/AndroidTreeView/issues/2/events","html_url":"https://github.com/bmelnychuk/AndroidTreeView/issues/2","id":57769056,"number":2,"title":"Dynamic Add/Remove Node","user":{"login":"patelakshay13890","id":6092323,"avatar_url":"https://avatars.githubusercontent.com/u/6092323?v=3","gravatar_id":"","url":"https://api.github.com/users/patelakshay13890","html_url":"https://github.com/patelakshay13890","followers_url":"https://api.github.com/users/patelakshay13890/followers","following_url":"https://api.github.com/users/patelakshay13890/following{/other_user}","gists_url":"https://api.github.com/users/patelakshay13890/gists{/gist_id}","starred_url":"https://api.github.com/users/patelakshay13890/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patelakshay13890/subscriptions","organizations_url":"https://api.github.com/users/patelakshay13890/orgs","repos_url":"https://api.github.com/users/patelakshay13890/repos","events_url":"https://api.github.com/users/patelakshay13890/events{/privacy}","received_events_url":"https://api.github.com/users/patelakshay13890/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-02-16T06:23:05Z","updated_at":"2015-03-21T19:31:48Z","closed_at":null,"body":"I need dynamic creation of Nodes on Expanding the Parent..\r\nSo how can i achieve this ?\r\n"},"comment":{"url":"https://api.github.com/repos/bmelnychuk/AndroidTreeView/issues/comments/84433962","html_url":"https://github.com/bmelnychuk/AndroidTreeView/issues/2#issuecomment-84433962","issue_url":"https://api.github.com/repos/bmelnychuk/AndroidTreeView/issues/2","id":84433962,"user":{"login":"DottiL","id":11047788,"avatar_url":"https://avatars.githubusercontent.com/u/11047788?v=3","gravatar_id":"","url":"https://api.github.com/users/DottiL","html_url":"https://github.com/DottiL","followers_url":"https://api.github.com/users/DottiL/followers","following_url":"https://api.github.com/users/DottiL/following{/other_user}","gists_url":"https://api.github.com/users/DottiL/gists{/gist_id}","starred_url":"https://api.github.com/users/DottiL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DottiL/subscriptions","organizations_url":"https://api.github.com/users/DottiL/orgs","repos_url":"https://api.github.com/users/DottiL/repos","events_url":"https://api.github.com/users/DottiL/events{/privacy}","received_events_url":"https://api.github.com/users/DottiL/received_events","type":"User","site_admin":false},"created_at":"2015-03-21T19:31:48Z","updated_at":"2015-03-21T19:31:48Z","body":"I think you missunderstand me. What I do is this:\r\n\r\nprivate void addFileRecursive(DropboxFile dbFile, TreeNode parent) {\r\n        if(!dbFile.getFileInfo().isFolder) {\r\n            TreeNode child = new TreeNode(dbFile.getFileInfo().path.getName());\r\n            parent.addChild(child);\r\n        } else {\r\n            TreeNode child = new TreeNode(dbFile.getFileInfo().path.getName());\r\n            parent.addChild(child);\r\n\r\n            List<DbxFileInfo> folderContent = null;\r\n            try {\r\n                folderContent = dbManager.getFileSystemByAccount(dbFile.getAccount()).listFolder(dbFile.getFileInfo().path);\r\n            } catch (DbxException e) {\r\n                e.printStackTrace();\r\n            }\r\n\r\n            for(DbxFileInfo info: folderContent) {\r\n                addFileRecursive(new DropboxFile(info, dbFile.getAccount()), child);\r\n            }\r\n        }\r\n    }\r\n\r\nThen I have a public function addFile that will call this recursive function.  This public function is called  by another object whenever a new file must be added. In the posted code, I just add to my tree the new node, but now I need to \"show\" the new file in the tree view. I'm wondering if there is a function like refreshView() that will show the new added nodes. What I tried was to create a new AndroidTrewwView and pass the root with the new added nodes, but this does not seems to work (I got an exception: \"The specified child has already a parent\", when I try to add the new view with container.addView(AndroidTreeView.getView())). Thank you"}}