public void addExercise(String name, List<SetModel> list_of_sets) { ExerciseModel exercise = new ExerciseModel(); exercise.setName(name); exercise.setSets(list_of_sets); mExercises.add(exercise); }
@Override public void onBindViewHolder(ExerciseAdapter.ViewHolder holder, int position) { ExerciseModel tmpExercise = mExercises.get(position); holder.mExerciseName.setText(tmpExercise.getName()); holder.mSets.setText("Sets: " + tmpExercise.getSets().size()); }