title: How can I inflate and loop views inside onBindViewHolder()?
body: <p>This is my first time to ask a question here. I will to explain clearly what problem is.</p>
  
  <p>I am creating an Android app that displays questions with choices/options in a feed. I used RecyclerView and CardView to display them. I was able to display the questions and other stuff but I am having difficulties display the options. I am trying to loop the array of options/choices inside the onBindViewHolder(). I can see in the log that the data is there but I can't/ I do not know how to add the views for the choices dynamically.</p>
  
  <p>I already have the loop but I am not certain how I can I inflate or display the textviews. This is my <code>onBindViewHolder()</code> code:</p>
  
  <pre><code>public void onBindViewHolder(PublicQuestionViewHolder publicQuestionViewHolder, int i) {
          publicQuestionViewHolder.questionAuthor.setText(questions.get(i).getQuestionAuthor());
          publicQuestionViewHolder.questionText.setText(questions.get(i).getQuestionText());
  
          ParseUser currentUser = ParseUser.getCurrentUser();
          if (currentUser == questions.get(i).getQuestionParseUser()) {
              publicQuestionViewHolder.questionEditIconImageView.setVisibility(View.VISIBLE);
          } else {
              publicQuestionViewHolder.questionEditIconImageView.setVisibility(View.INVISIBLE);
          }
          //Log.d("Options", String.valueOf(questions.get(i).getQuestionOptions().size()));
  
          if (questions.get(i).getQuestionOptions().size() != 0) {
  
              for (QuestionOption option : questions.get(i).getQuestionOptions()) {
                  if (option.getQuestionOptionType().equals("T")) {
                      Log.d("Option", option.getQuestionOptionText());
  
  
                  } else if (option.getQuestionOptionType().equals("I")) {
                      Log.d("Option", option.getQuestionOptionImage().getName());
                  }
              }
          }
  
      }
  </code></pre>