Open george-chashel opened 6 years ago
how to get the name of the parent node after using view holders. eg
TreeNode myDocuments = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_folder, "My Documents")); TreeNode downloads = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_folder, "Downloads")); TreeNode file1 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_drive_file, "Folder 1")); TreeNode file2 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_drive_file, "Folder 2")); TreeNode file3 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_drive_file, "Folder 3")); TreeNode file4 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_drive_file, "Folder 4")); fillDownloadsFolder(downloads); downloads.addChildren(file1, file2, file3, file4);
how to get the name of of "downloads" from file4
MenuTreeItem parentNodeValues = (MenuTreeItem) node.getParent().getValue(); parentNodeValues.getMenuName();
how to get the name of the parent node after using view holders. eg
how to get the name of of "downloads" from file4