RecyclerView Item 行高定义无效

错误的:new MyViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_view, null));

应该为new MyViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_view, parent, false));

null改为parent, false;

猜你喜欢

转载自blog.csdn.net/raotenghong2611/article/details/81184114