📅  最后修改于: 2022-03-11 14:53:32.395000             🧑  作者: Mango
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext())
.inflate(R.layout.design_item, parent, false);
v.setLayoutParams(new ViewGroup.LayoutParams((int) (parent.getWidth() * 0.5),ViewGroup.LayoutParams.MATCH_PARENT));
return new ViewHolder(v);
}