Recyclerview horizontal Largeur de l'élément moitié de l'écran Android
@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);
}
Sudarshaana