title: Removing items from recycler view generates an error
body: <p>I want to remove certain items from RecyclerView. I am able to remove a single item at a time but unable to remove multiple items at once. Below is the code for removing items:</p>
  
  <pre><code>final  Online2_G_S online2_g_s = online2_g_sList.get(position);
  
  if (online2_g_s.getpMrp()==0){
     removeItem(holder.getAdapterPosition());
  }
  
  private void removeItem(final int position) {
      new Handler().post(new Runnable() {
          @Override
          public void run() {
  
              try{
                  Log.i("sand36", String.valueOf(position)+" "+online2_g_sList.get(position));
                  online2_g_sList.remove(position);
                  notifyItemRemoved(position);
                  notifyItemRangeChanged(position, online2_g_sList.size());
  
              }catch (Exception e){
                  Log.i("sand36", String.valueOf(e));
              }
          }
  });
  </code></pre>
  
  <p>and here is the error I am getting while removing items:</p>
  
  <pre><code>09-14 09:09:36.816 26394-26394/com.parse.AwaazDo I/sand36: java.lang.IndexOutOfBoundsException: Invalid index 4, size is 4   
  09-14 09:09:36.817 26394-26394/com.parse.AwaazDo I/sand36: java.lang.IndexOutOfBoundsException: Invalid index 2, size is 2
  09-14 09:09:36.870 26394-26394/com.parse.AwaazDo I/sand36: java.lang.IndexOutOfBoundsException: Invalid index 1, size is 1
  </code></pre>