code: @Override
      public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
          View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.image_thumbnail, viewGroup, false);
          v.setLayoutParams(getGridItemLayoutParams(v));
  
          return new ImageViewHolder(v);
      }
docs: endregion