AndroidTreeView icon indicating copy to clipboard operation
AndroidTreeView copied to clipboard

Set Tree node to accept full width

Open prasad456 opened this issue 8 years ago • 2 comments

I used Custom View for the node it applies as wrap Content I used the views as MAtch Parent

prasad456 avatar Dec 27 '17 10:12 prasad456

public static class MyHolder extends TreeNode.BaseNodeViewHolder<Category> {

        public MyHolder(Context context) {
            super(context);
        }

        @Override
        public View createNodeView(final TreeNode node, Category value) {
            final LayoutInflater inflater = LayoutInflater.from(context);
            final View view = inflater.inflate(R.layout.row_category_simple, null, false);
           ViewGroup.LayoutParams rootParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
            view.setLayoutParams(rootParams);  ///////*********set layout params to your view
           
            return view;
        }
    }

ehsanhvd avatar May 15 '18 04:05 ehsanhvd

@ehsanhvd Nice workaround 👍

testica avatar Jan 16 '19 01:01 testica