title: Removing item from a custom RecycleView adapter with swiping right messes up with the item order
body: <p>I have an <code>ArrayList</code>&lt;String&gt; with 6 items {"1", "2", "3", "4", "5", "6"}. </p>
  
  <p>I am representing these items with a <code>CardView</code>. I want to remove the items with swiping left. </p>
  
  <p>It looks like this: <a href="http://imgur.com/cuWoiB3" rel="nofollow">http://imgur.com/cuWoiB3</a></p>
  
  <p>When I swipe right from number 2, it looks like this: <a href="http://imgur.com/5E9fwP0" rel="nofollow">http://imgur.com/5E9fwP0</a></p>
  
  <p>If I remove Number 5, it removes number 2. If I remove number 3, it removes number 1. It seems to be completely random.</p>
  
  <p>Am I missing something here? How do I fix this?</p>
  
  <p>Relevant code:</p>
  
  <p>My adapter: </p>
  
  <pre><code>public class ChoresAdapter extends RecyclerView.Adapter&amp;lt;ChoresAdapter.ChoreViewHolder&amp;gt;{
  
  private ArrayList&amp;lt;String&amp;gt; chores;
  
  public ChoresAdapter(ArrayList&amp;lt;String&amp;gt; chores){
      this.chores = chores;
  }
  
  @Override
  public ChoreViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
      View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.single_cardview, parent, false);
      v.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
          }
      });
      ChoreViewHolder pvh = new ChoreViewHolder(v);
      return pvh;
  }
  
  
  @Override
  public void onBindViewHolder(ChoreViewHolder holder, int position) {
      holder.choreName.setText(this.chores.get(position));
  }
  
  @Override
  public int getItemCount() {
      return this.chores.size();
  }
  
  public void removeAt(int position) {
      this.chores.remove(position);
      notifyItemRemoved(position);
      notifyDataSetChanged();
  }
  
  public static class ChoreViewHolder extends RecyclerView.ViewHolder {
      CardView cv;
      public static TextView choreName;
      public static TextView personAge;
      public static ImageView personPhoto;
  
      ChoreViewHolder(View itemView) {
          super(itemView);
          cv = (CardView)itemView.findViewById(R.id.cv);
          choreName = (TextView)itemView.findViewById(R.id.chore_name);
      }
      }
  
    }
  </code></pre>
  
  <p>Relevant code in my fragment: </p>
  
  <pre><code>    @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      View view = inflater.inflate(R.layout.fragment_chores, container, false);
      RecyclerView rv = (RecyclerView)view.findViewById(R.id.rv);
      rv.setHasFixedSize(true);
  
      LinearLayoutManager llm = new LinearLayoutManager(getActivity());
      rv.setLayoutManager(llm);
      chores = new ArrayList&amp;lt;&amp;gt;();
      chores.add("1");
      chores.add("2");
      chores.add("3");
      chores.add("4");
      chores.add("5");
      chores.add("6");
      adapter = new ChoresAdapter(chores);
      SwipeableRecyclerViewTouchListener swipeTouchListener =
              new SwipeableRecyclerViewTouchListener(rv,
                      new SwipeableRecyclerViewTouchListener.SwipeListener() {
                          @Override
                          public boolean canSwipe(int position) {
                              return true;
                          }
  
                          @Override
                          public void onDismissedBySwipeLeft(RecyclerView recyclerView, int[] reverseSortedPositions) {
                              for (int position : reverseSortedPositions) {
                                  adapter.removeAt(position);
                              }
                          }
  
                          @Override
                          public void onDismissedBySwipeRight(RecyclerView recyclerView, int[] reverseSortedPositions) {
                              for (int position : reverseSortedPositions) {
                                  adapter.removeAt(position);
                              }
                          }
                      });
  
      rv.addOnItemTouchListener(swipeTouchListener);
      rv.setAdapter(adapter);
      return view;
  }
  </code></pre>