AndroidTreeView icon indicating copy to clipboard operation
AndroidTreeView copied to clipboard

Set full width of node

Open ab786 opened this issue 9 years ago • 3 comments

How to set full width of node on tap instead of wrap content?

ab786 avatar Sep 21 '15 10:09 ab786

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

bmelnychuk avatar Sep 21 '15 14:09 bmelnychuk

why is it that 2d scrolling is only WRAP_CONTENT?

glend1 avatar May 05 '17 21:05 glend1

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;
    }

jurgensr avatar Feb 01 '18 16:02 jurgensr