title: RecyclerView checks wrong items as i scroll down
body: <p>I decided to use RecyclerView to display my list of data. There's a checkbox, 2 TextViews and one ImageView in each item/row. I have created my Adapter to handle everything, and to add the checked items to my final list.</p>
  
  <p>The problem is that when I check a few items and scroll down some of the items will appear as checked and when I scroll up the ones I had checked previously appears as unchecked. The Images and the Textviews are OK, but the checkbox messes up when scrolling down and up.</p>
  
  <p>This is my Adapter:</p>
  
  <pre><code>public class TeamAdapter extends RecyclerView.Adapter&lt;TeamAdapter.MyViewHolder&gt; {
  
      private Context mContext;
      private List&lt;UserProject&gt; UserList;
      private UserProject user;
  
  
      public class MyViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener{
          public TextView name, description;
          public CircleImageView profile_image;
          public CheckBox check;
  
          public MyViewHolder(View view) {
              super(view);
              name = (TextView) view.findViewById(R.id.name);
              description = (TextView) view.findViewById(R.id.description);
              profile_image = (CircleImageView) view.findViewById(R.id.profile_image);
              check = (CheckBox) view.findViewById(R.id.check);
          }
          @Override
          public void onClick(View v) {
              if (mItemClickListener != null) {
                  mItemClickListener.onItemClickListener(v, getAdapterPosition());
              }
          }
      }
  
  
      public TeamAdapter(Context mContext, List&lt;UserProject&gt; userList) {
          this.mContext = mContext;
          this.UserList = userList;
  
      }
      @Override
      public TeamAdapter.MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          View itemView = LayoutInflater.from(parent.getContext())
                  .inflate(R.layout.adapter_teams, parent, false);
  
          return new MyViewHolder(itemView);
      }
  
      @Override
      public void onBindViewHolder(final TeamAdapter.MyViewHolder holder, final int position) {
  
          user = UserList.get(position);
  
          holder.name.setText(user.getName());
          holder.description.setText(user.getCompany());
  
          if(user.getImageURL() != null &amp;&amp; !user.getImageURL().isEmpty()) {
              Picasso.with(mContext).load(user.getImageURL()).into(holder.profile_image);
          }
  
          holder.check.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
              @Override
              public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                  if(isChecked){
                      ActivityTeams.newList.add(UserList.get(position));
                  }else {
                      ActivityTeams.newList.remove(UserList.get(position));
                  }
              }
          });
  
      }
  
  
      @Override
      public int getItemCount() {
          return UserList.size();
      }
  
      private TeamAdapter.onRecyclerViewItemClickListener mItemClickListener;
  
      public void setOnItemClickListener(TeamAdapter.onRecyclerViewItemClickListener mItemClickListener) {
          this.mItemClickListener = mItemClickListener;
      }
  
      public interface onRecyclerViewItemClickListener {
          void onItemClickListener(View view, int position);
      }
  }
  </code></pre>