Open prasad456 opened 6 years ago
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 Nice workaround 👍
I used Custom View for the node it applies as wrap Content I used the views as MAtch Parent