What I want is to make the data of the Cardview
appear in a tabla1
and in the next CardView
the data of the tabla2
. I tried to enter the data in the method onBindViewHolder
but I have not succeeded. This is what I tried to do:
public void onBindViewHolder(final ViewHolder holder, int position) {
holder._info.setText(tabla1.get(position).getInfo_estadistica());
holder._seleccion.setText(tabla1.get(position).getSeleccion());
holder.tituloCV.setText(tabla1.get(position).getTitulo_CV());
holder.fondoCV.setImageResource(tabla1.get(position).getImagen_CV());
holder._logo.setImageResource(tabla1.get(position).getLogo_equipo());
holder._info.setText(tabla2.get(position).getInfoEq1_estadistica());
holder._seleccion.setText(tabla2.get(position).getSeleccion_Eq1());
holder.tituloCV.setText(tabla2.get(position).getTitulo_CV());
holder.fondoCV.setImageResource(tabla2.get(position).getImagen_CV());
}
@Override
public int getItemCount() {
//Obtener la cantidad de CardView que el Recycler va a cargar
return size = (tabla1.size() + tabla2.size());
}
I only put these two methods considering that this is where the data is entered into views
.