@Override public void onBindViewHolder(ViewHolder viewHolder, int i) { Comida item = Comida.COMIDAS_POPULARES.get(i); Glide.with(viewHolder.itemView.getContext()) .load(item.getIdDrawable()) .centerCrop() .into(viewHolder.imagen); viewHolder.nombre.setText(item.getNombre()); viewHolder.precio.setText("$" + item.getPrecio()); }
@Override public int getItemCount() { return Comida.COMIDAS_POPULARES.size(); }