title: RecyclerView Adapter Item Value being changed incorrectly
body: <p>I'm currently looking to find out if someone can notice anything I'm missing, been looking at this for a while now! I have a list inside a recyclerview and certain questions inside that list can store an image beside it alongside a boolean value. When taking the first image, any values currently selected do not change value. However, when taking a second image, the values are reset i.e selected is changed to false and the text is being cleared. My question is can anyone see why the boolean value of selected is being changed to false when I haven't deselected the checkbox to change the value. Thanks in advance!</p>
  
  <pre><code>   private void OnRiskBind(final RAMS_Question q, final RecyclerView.ViewHolder view, final int position) {
          final RiskHolder v = (RiskHolder) view;
          v.vQuestion.setText(q.title + " - " + q.question);
  
          v.vSelected.setChecked(q.selected);
  
          //v.vControls.setText(q.comments);
          //v.vAction.setText(q.further_Action);
  
          for (int i = 0; i &lt; v.vImageViews.size(); i++) {
              v.vImageViews.get(i).setImageBitmap(null);
          }
  
          for (int i = 0; i &lt; q.Risk_Images.size(); i++) {
              byte[] decodedString = Base64.decode(q.Risk_Images.get(i).image, Base64.DEFAULT);
              Bitmap bm = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);
              v.vImageViews.get(i).setImageBitmap(bm);
          }
  
          if (q.selected) {
              v.vLayoutRisk.setVisibility(View.VISIBLE);
              q.response = 1;
  
              if (q.comments != null)
                  v.vControls.setText(q.comments);
  
              if (q.further_Action != null)
                  v.vAction.setText(q.further_Action);
          } else {
              v.vLayoutRisk.setVisibility(View.GONE);
              q.response = 0;
              q.comments = null;
              q.further_Action = null;
          }
  
          v.vSelected.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
              @Override
              public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                  q.selected = isChecked;
                  v.vSelected.setChecked(q.selected);
  
                  if (q.selected) {
                      v.vLayoutRisk.setVisibility(View.VISIBLE);
                      q.response = 1;
                  } else {
                      v.vLayoutRisk.setVisibility(View.GONE);
                      q.response = 0;
                      q.comments = null;
                      q.further_Action = null;
                      q.selected = false;
                  }
              }
          });
  
          v.vControls.addTextChangedListener(new TextWatcher() {
              @Override
              public void beforeTextChanged(CharSequence s, int start, int count, int after) {
  
              }
  
              @Override
              public void onTextChanged(CharSequence s, int start, int before, int count) {
                  q.comments = v.vControls.getText().toString();
              }
  
              @Override
              public void afterTextChanged(Editable s) {
  
              }
          });
  
          v.vAction.addTextChangedListener(new TextWatcher() {
              @Override
              public void beforeTextChanged(CharSequence s, int start, int count, int after) {
  
              }
  
              @Override
              public void onTextChanged(CharSequence s, int start, int before, int count) {
                  q.further_Action = v.vAction.getText().toString();
              }
  
              @Override
              public void afterTextChanged(Editable s) {
  
              }
          });
  
          v.btnCamera.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  listener.cameraClicked(position);
              }
          });
  
          v.img1.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  listener.removeImage1(position);
              }
          });
  
          v.img2.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  listener.removeImage2(position);
              }
          });
  
          v.img3.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  listener.removeImage3(position);
              }
          });
      }
  // Relevant section of adapter inside activity
  adapter = new RAMSAdapter(questions, new OnRAMSRiskClickListener() {
              @Override
              public void cameraClicked(int position) {
                  if (adapter.getItem(position).Risk_Images.size() != 3) {
                      Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
                      if (cameraIntent.resolveActivity(getActivity().getPackageManager()) != null){
                          File photoFile = null;
                          try {
                              photoFile = setUpPhotoFile(position);
                          } catch (Exception ex){
                              Toast.makeText(getActivity().getApplicationContext(), ex.getMessage(), Toast.LENGTH_LONG).show();
                          }
                          if (photoFile != null){
                              cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photoFile));
                              mCurrentPosition = position;
                              startActivityForResult(cameraIntent, 1);
                          }
                      }
                  } else {
                      Toast.makeText(getActivity().getApplicationContext(), "You have reached the max number of images", Toast.LENGTH_SHORT).show();
                  }
              }
  
      @Override
      public void onActivityResult(int requestCode, int resultCode, Intent data) {
          Boolean picTaken = false;
          if (requestCode == REQUEST_IMAGE_CAPTURE &amp;&amp; resultCode == getActivity().RESULT_OK) {
              try {
                  if (mCurrentPhotoPath != null) {
                      picTaken = true;
                      Bitmap resizedImage = Utility.resizeBitmap(mCurrentPhotoPath, 1024, 768);
                      resizedImage = Bitmap.createScaledBitmap(resizedImage, 1024, 768, false);
  
                      File file = new File(mCurrentPhotoPath);
                      if (file.exists())
                          file.delete();
  
                      FileOutputStream out = new FileOutputStream(mCurrentPhotoPath);
                      resizedImage.compress(Bitmap.CompressFormat.JPEG, 50, out);
  
                      Bitmap bm = BitmapFactory.decodeFile(mCurrentPhotoPath);
                      bm = Utility.resizeImage(bm, 768);
  
                      ByteArrayOutputStream baos = new ByteArrayOutputStream();
                      bm.compress(Bitmap.CompressFormat.JPEG, 50, baos);
                      byte[] b = baos.toByteArray();
  
                      //questions.get(mCurrentPosition).image = Base64.encodeToString(b, Base64.DEFAULT);
                      //setupAdapter();
  
                      String imageBase64 = Base64.encodeToString(b, Base64.DEFAULT);
  
                      adapter.getItem(mCurrentPosition).addImage(imageBase64);
                      adapter.notifyItemChanged(mCurrentPosition);
                      //adapter.notifyDataSetChanged();
  
                      mCurrentPhotoPath = null;
                  }
              } catch (Exception ex) {
                  Toast.makeText(getActivity().getApplicationContext(), ex.getMessage(), Toast.LENGTH_LONG).show();
              }
          }
  
          if (!picTaken) {
              File file = new File(mCurrentPhotoPath);
              file.delete();
          }
      }
  </code></pre>