app/src/main/java/cl/ucn/disc/dsm/thenews/activities/adapters/NoticiaViewHolder.java
public void bind(final Noticia noticia) {

    this.binding.tvTitulo.setText(noticia.getTitulo());
    this.binding.tvResumen.setText(noticia.getResumen());
    this.binding.tvAutor.setText(noticia.getAutor());
    this.binding.tvFuente.setText(noticia.getFuente());
    this.binding.tvFecha.setText(noticia.getFecha().toString());

    // If exist the url ..
    if (noticia.getUrlFoto() != null) {
      // .. set the uri
      this.binding.sdvFoto.setImageURI(noticia.getUrlFoto());
    } else {
      // .. set a default image
      this.binding.sdvFoto.setImageResource(R.drawable.ic_launcher_background);
    }

    // ZonedDateTime to Date
    final Date date = DateTimeUtils.toDate(noticia.getFecha().toInstant());
    this.binding.tvFecha.setText(PRETTY_TIME.format(date));
  }
/**
   * Bind the Noticia to the ViewHolder.
   *
   * @param noticia to bind.
   */
Bind the Noticia to the ViewHolder.
@param noticia to bind.
Bind the Noticia to the ViewHolder . @param noticia to bind .
public void bind(final Noticia noticia) {
    this.binding.tvTitulo.setText(noticia.getTitulo());
    this.binding.tvResumen.setText(noticia.getResumen());
    this.binding.tvAutor.setText(noticia.getAutor());
    this.binding.tvFuente.setText(noticia.getFuente());
    this.binding.tvFecha.setText(noticia.getFecha().toString());
    if (noticia.getUrlFoto() != null) {
      this.binding.sdvFoto.setImageURI(noticia.getUrlFoto());
    } else {
      this.binding.sdvFoto.setImageResource(R.drawable.ic_launcher_background);
    }
    final Date date = DateTimeUtils.toDate(noticia.getFecha().toInstant());
    this.binding.tvFecha.setText(PRETTY_TIME.format(date));
  }
public void bind ( final Noticia noticia ) { this . binding . tvTitulo . setText ( noticia . getTitulo ( ) ) ; this . binding . tvResumen . setText ( noticia . getResumen ( ) ) ; this . binding . tvAutor . setText ( noticia . getAutor ( ) ) ; this . binding . tvFuente . setText ( noticia . getFuente ( ) ) ; this . binding . tvFecha . setText ( noticia . getFecha ( ) . toString ( ) ) ; if ( noticia . getUrlFoto ( ) != null ) { this . binding . sdvFoto . setImageURI ( noticia . getUrlFoto ( ) ) ; } else { this . binding . sdvFoto . setImageResource ( R . drawable . ic_launcher_background ) ; } final Date date = DateTimeUtils . toDate ( noticia . getFecha ( ) . toInstant ( ) ) ; this . binding . tvFecha . setText ( PRETTY_TIME . format ( date ) ) ; }
Bind the Noticia to the ViewHolder.
Bind the Noticia to the ViewHolder .
// If exist the url .. // .. set the uri // .. set a default image // ZonedDateTime to Date