AndroidTreeView
AndroidTreeView copied to clipboard
Set full width of node
How to set full width of node on tap instead of wrap content?
It depends of your ViewHolder and styles you are applying there. Take a look at CustomViewHolderFragment.java. But keep in mind with 2d scrolling only wrap content available
why is it that 2d scrolling is only WRAP_CONTENT
?
Fix TreeNode.java
public View getView() {
if (mView != null) {
return mView;
}
final View nodeView = getNodeView();
nodeView.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));//JR - fix for MATCH_PARENT
final TreeNodeWrapperView nodeWrapperView = new TreeNodeWrapperView(nodeView.getContext(), getContainerStyle());
nodeWrapperView.insertNodeView(nodeView);
mView = nodeWrapperView;
return mView;
}