title: Single radio button check uncheck issue in recyclerview
body: <p>I'm unable to play with Radio Button which is in Recyclerview. Please, check below images to get the problem.</p>
  
  <p><strong>1. First Image</strong></p>
  
  <p><a href="https://i.stack.imgur.com/rLzxh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rLzxh.png" alt="First One"></a></p>
  
  <p><strong>2. Second Image</strong></p>
  
  <p><a href="https://i.stack.imgur.com/9IWeW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9IWeW.png" alt="Second One"></a></p>
  
  <p><strong>3. Third Image</strong></p>
  
  <p><a href="https://i.stack.imgur.com/jGv3K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jGv3K.png" alt="Third One"></a></p>
  
  <p><strong>4. Fourth Image</strong></p>
  
  <p><a href="https://i.stack.imgur.com/QwP45.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QwP45.png" alt="Fourth One"></a></p>
  
  <p><strong>What is the problem?</strong></p>
  
  <p><strong>First Image</strong> show when this screen initially comes first time. When I select anyone option it will be highlighted in green colour and appropriate radio button get checked that is shown in <strong>Second Image</strong>.</p>
  
  <p>When I want to select another option, it unchecked the previous selection but not checking the new one i.e shown in <strong>Third Image</strong>.</p>
  
  <p>When I again click, It get checked which is wrong. It should unchecked previous selection and checked new selection on first click only. i.e shown in <strong>Fourth Image</strong>.</p>
  
  <p>My Adapter class is like below.</p>
  
  <pre><code>    public class PaymentOptionsAdapter extends RecyclerView.Adapter&lt;PaymentOptionsAdapter.ViewHolder&gt; {
  
      Context context;
      List&lt;String&gt; listOfPaymentOptions;
      int mCheckedPostion = -1;
      private boolean isChecked = false;
  
      public PaymentOptionsAdapter(Context context, List&lt;String&gt; listOfPaymentOptions) {
          this.context = context;
          this.listOfPaymentOptions = listOfPaymentOptions;
      }
  
      @Override
      public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          View view = LayoutInflater.from(context).inflate(R.layout.row_payment_options, parent, false);
          ViewHolder viewHolder = new ViewHolder(view);
          return viewHolder;
      }
  
      @Override
      public void onBindViewHolder(final ViewHolder holder, final int position) {
          holder.txtOption.setText(listOfPaymentOptions.get(position));
          if (mCheckedPostion == position) {
              holder.txtOption.setTextColor(context.getResources().getColor(R.color.green_txt));
              holder.radioSelect.setChecked(true);
              if (position == 0) {
                  new AppShare(context).setPaymentOption(context.getString(R.string.cod));
              } else if (position == 1) {
                  new AppShare(context).setPaymentOption(context.getString(R.string.payu));
              } else if (position == 2) {
                  new AppShare(context).setPaymentOption(context.getString(R.string.online));
              }
          } else {
              holder.txtOption.setTextColor(context.getResources().getColor(R.color.black));
              holder.radioSelect.setChecked(false);
          }
  
          holder.layoutContainer.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  if (!isChecked) {
                      notifyItemChanged(mCheckedPostion);
                      mCheckedPostion = position;
                      notifyItemChanged(mCheckedPostion);
                      isChecked = true;
                  } else {
                      notifyItemChanged(mCheckedPostion);
                      mCheckedPostion = -1;
                      notifyItemChanged(position);
                      isChecked = false;
                      new AppShare(context).setPaymentOption(null);
                  }
              }
          });
  
          holder.radioSelect.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  if (!isChecked) {
                      notifyItemChanged(mCheckedPostion);
                      mCheckedPostion = position;
                      notifyItemChanged(mCheckedPostion);
                      isChecked = true;
                  } else {
                      notifyItemChanged(mCheckedPostion);
                      mCheckedPostion = -1;
                      notifyItemChanged(position);
                      isChecked = false;
                      new AppShare(context).setPaymentOption(null);
                  }
              }
          });
      }
  
      @Override
      public int getItemCount() {
          return listOfPaymentOptions.size();
      }
  
      public class ViewHolder extends RecyclerView.ViewHolder {
  
          RelativeLayout layoutContainer;
          TextView txtOption;
          RadioButton radioSelect;
  
          public ViewHolder(View itemView) {
              super(itemView);
              layoutContainer = (RelativeLayout) itemView.findViewById(R.id.layoutContainer);
              txtOption = (TextView) itemView.findViewById(R.id.txtOption);
              radioSelect = (RadioButton) itemView.findViewById(R.id.radioSelect);
              txtOption.setTypeface(FontUtils.getInstance(context).getRobotoTypeFace());
          }
      }
  }
  </code></pre>
  
  <p>row_payment_options.xml</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="@dimen/card_view_height"
      android:background="@color/white"
      android:orientation="vertical"&gt;
  
      &lt;RelativeLayout
          android:id="@+id/layoutContainer"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
  
          &lt;TextView
              android:id="@+id/txtOption"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_centerVertical="true"
              android:paddingLeft="@dimen/large_margin"
              android:text="TextView"
              android:textColor="@color/black"
              android:textSize="@dimen/text_title" /&gt;
  
          &lt;RadioButton
              android:id="@+id/radioSelect"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentRight="true"
              android:layout_centerVertical="true"
              android:checked="false"
              android:paddingRight="@dimen/large_margin" /&gt;
  
          &lt;View
              android:layout_width="match_parent"
              android:layout_height="0.5dp"
              android:layout_alignParentBottom="true"
              android:layout_marginLeft="@dimen/large_margin"
              android:layout_marginRight="@dimen/x_large_margin"
              android:layout_toLeftOf="@+id/radioSelect"
              android:background="@color/gray_border" /&gt;
      &lt;/RelativeLayout&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>