Can someone explain to me, what the problem is?
When I scroll down and then back to the top, my items were changed for other items in the list, and if I scroll again, th
you define your item in wrong place, define your View inside of view holder
and like below
public static class AcademicVH extends RecyclerView.ViewHolder {
private LinearLayout containerData;
public AcademicVH(View itemView) {
super(itemView);
TextView txtSubject = (TextView) view.findViewById(R.id.txtSubjectValue);
TextView txtGroup = (TextView) view.findViewById(R.id.txtGroupValue);
TextView txtStatus = (TextView) view.findViewById(R.id.txtStatusValue);
TextView txtFinalNote = (TextView) view.findViewById(R.id.txtFinalNoteValue);
TextView txtYear = (TextView) view.findViewById(R.id.txtYearValue);
containerData = (LinearLayout) itemView.findViewById(R.id.containerData);
}
}
another trick, when you use condition (if) in your onBindViewHolder, you should complete it with (else).