安卓小白记录

TreeNode root = TreeNode.root();
TreeNode treeNode = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_folder, entity.getName(), entity.getID() + "", 0, true ,entity.getGUID(),entity.getTotalNum(),entity.getOnlineNum(),"",entity.getLevelType())).setViewHolder(new SelectableHeaderHolder(getActivity())); root.addChild(treeNode); loadTree(treeNode, entity.getGUID(),areaID);tView =new AndroidTreeView(getActivity(), root);

tView.setDefaultAnimation(true);

tView.setUse2dScroll(false);

tView.setDefaultContainerStyle(R.style.TreeNodeStyleCustom);

tView.setDefaultNodeClickListener(nodeClickListener);

tView.setUseAutoToggle(false);

tView.setDefaultViewHolder(IconTreeItemHolder.class);

container.addView(tView.getView());