Пример #1
0
  @Override
  public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) {
    Movie movie = (Movie) item;
    ImageCardView cardView = (ImageCardView) viewHolder.view;

    Log.d(TAG, "onBindViewHolder");
    if (movie.getCardImageUrl() != null) {
      cardView.setTitleText(movie.getTitle());
      cardView.setContentText(movie.getStudio());
      cardView.setMainImageDimensions(CARD_WIDTH, CARD_HEIGHT);
      Glide.with(viewHolder.view.getContext())
          .load(movie.getCardImageUrl())
          .centerCrop()
          .error(mDefaultCardImage)
          .into(cardView.getMainImageView());
    }
  }