title: How to get values of selected radiobutton in a recyclerview?
body: <p>Dynamically, i have added multiple options under one question in recycleview. Now a user can select one option inside each questions.Look at the below image,
  <a href="https://i.stack.imgur.com/zb17Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zb17Y.png" alt="enter image description here"></a></p>
  
  <p><code>Recyclerview Adapter</code> class is,</p>
  
  <pre><code> @Override
      public void onBindViewHolder(final MyViewHolder holder,int position) {
          final PollQstWithAns poll = dataList.get(position);
  
          holder.txt_poll_question.setText(poll.getPollQstName());
  
          for (int i = 0; i &lt; poll.getOptionList().size(); i++) {
              final PollsData mPollsOptionsList = poll.getOptionList().get(i);
  
              final RadioButton rb = new RadioButton(context);
              rb.setText(mPollsOptionsList.getAns1());
              if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.LOLLIPOP) {
  
                  ColorStateList colorStateList = new ColorStateList(
                          new int[][]{
  
                                  new int[]{-android.R.attr.state_enabled},
                                  new int[]{android.R.attr.state_enabled}
                          },
                          new int[]{
  
                                  Color.DKGRAY
                                  , ContextCompat.getColor(context, R.color.colorPrimary)
  
                          }
                  );
                  rb.setButtonTintList(colorStateList);
                  rb.invalidate();
                  rb.setTextColor(ContextCompat.getColor(context, R.color.gray));
              }
  
              holder.optionRadioGroup.addView(rb);
  
          }
      }
  </code></pre>
  
  <p>I want to get all checked values from each questions, if user select the <code>RadioButton</code> inside the <code>RadioGroup</code>.</p>