title: Get all viewholders recyclerview
body: <p>I need to get the position of all the <code>viewholders</code> in my <code>recyclerview</code>. Basically, when the user clicks a button, if any edit text fields are blank, the user cannot proceed. I am also setting each edit text through a setter in a class. This is so that I can remove the underline for all of the edit texts and basically make it not editable.</p>
  
  <p>This is my onbindviewholder</p>
  
  <pre><code> @Override
  public void onBindViewHolder(final RecyclerView.ViewHolder holder, int position){
  
  
      /*
      Holder for exercise row
      Sets the text for exercise, weight, sets, and reps
      Disables text if save button is clicked
       */
      if(holder instanceof ExerciseRowHolder) {
  
          int pos = holder.getAdapterPosition();
          Log.d("pos", String.format("%s", pos));
          ((ExerciseModel) rowTypeList.get(pos)).setExerciseEditText(((ExerciseRowHolder) holder).exercise);
          ((ExerciseModel) rowTypeList.get(pos)).setWeightEditText(((ExerciseRowHolder) holder).weight);
          ((ExerciseModel) rowTypeList.get(pos)).setSetsEditText(((ExerciseRowHolder) holder).set);
          ((ExerciseModel) rowTypeList.get(pos)).setRepsEditText(((ExerciseRowHolder) holder).rep);
          ((ExerciseModel) rowTypeList.get(pos)).setDragHandle(((ExerciseRowHolder) holder).dragHandle);
          ((ExerciseModel) rowTypeList.get(pos)).setExerciseRowTextWatcher(((ExerciseRowHolder) holder).exerciseRowTextWatcher);
          ((ExerciseRowHolder) holder).updatePosition(pos);
  </code></pre>
  
  <p>This is when a user clicks that button. The issue with this is that the edit texts will return null for <code>viewholders</code> outside of the screen because the edit texts are being set in <code>onbindviewholder</code>, which means only the edit texts on the screen are being set. I need all of the edit texts to be set. Any suggestions on getting all the <code>viewholders</code> of a <code>recyclerview</code>?</p>
  
  <pre><code>        int childCount = displayWorkoutAdapter.getItemCount() - 1;
      //checks for all the children of recyclerView excluding the buttons
      for (int a = childCount; a &gt; 0; a--) {
          RowType rowType = displayWorkoutAdapter.rowTypeList.get(a);
  
          //if the first row = exercise row, check to see if there is any input in the exercise, sets, and reps field
          //if not, display error
          if (rowType.getClass() == ExerciseModel.class) {
              AutoCompleteTextView exercise = ((ExerciseModel) rowType).getExerciseEditText();
              EditText weight = ((ExerciseModel) rowType).getWeightEditText();
              EditText sets = ((ExerciseModel) rowType).getSetsEditText();
              EditText reps = ((ExerciseModel) rowType).getRepsEditText();
  
              /*
              if(exercise == null){
                  exercise = exerciseRow.findViewById(R.id.autoCompleteTextView);
                  weight = exerciseRow.findViewById(R.id.weight);
                  sets = exerciseRow.findViewById(R.id.sets);
                  reps = exerciseRow.findViewById(R.id.reps);
              }*/
  
  
              textListenerToRemoveError(exercise, weight, sets, reps);
  </code></pre>