public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { View workoutView = inflater.Inflate(Resource.Layout.log_workout, parent, false); ViewHolder holder = new WorkoutViewHolder(workoutView); return(holder); }
public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { WorkoutViewHolder myHolder = holder as WorkoutViewHolder; myHolder.tvWorkoutTitle.Text = workout_list.ElementAt(position).Name; List <ExerciseSets> exerciseSets = handler.GetExercisesNSetsWorkout(workout_list.ElementAt(position).Id); if (exerciseSets.Count > 0) { myHolder.rvExercises.SetLayoutManager(new LinearLayoutManager(myHolder.rvExercises.Context)); myHolder.rvExercises.SetAdapter(new ExerciseNSetsAdapter(myHolder.rvExercises.Context, exerciseSets)); } }