title: android -recycleview using notifyItemRemoved not working properly
body: <p>I'm using recycleview for populating my items.  I'm trying to use notifyItemRemoved to remove an item from my recycleview  but it does not hide the row and it doesn't notify the adapter .this is my adapter code :</p>
  
  <pre><code>public class CatsAdapter extends RecyclerView.Adapter&lt;CatsAdapter.MyViewHolder&gt; {
      private LayoutInflater inflater;
      private List&lt;CatItems&gt; list;
  
      public CatsAdapter(Context context, List&lt;CatItems&gt; feedItemList) {
          inflater = LayoutInflater.from(context);
          this.list = feedItemList;
      }
  
  
      public void addAll(List&lt;CatItems&gt; catItems) {
          if (this.list == null) {
              this.list = catItems;
          } else {
              this.list.addAll(catItems);
          }
          notifyDataSetChanged();
          notifyItemInserted(list.size());
      }
  
      public void remove(int pos) {
          this.list.remove(pos);
          notifyItemRemoved(pos);
          notifyItemRangeChanged(pos, getItemCount()-pos);
      }
  
      @Override
      public MyViewHolder onCreateViewHolder(ViewGroup parrent, int i) {
          View view = inflater.inflate(R.layout.row_grid2, parrent, false);
          MyViewHolder holder = new MyViewHolder(view);
          return holder;
      }
  
      @Override
      public void onBindViewHolder(final MyViewHolder viewHolder, final int position) {
          CatItems item = list.get(position);
              viewHolder.del.setTag(item.getId());
              viewHolder.del.setOnClickListener(new OnClickListener() {
                  @Override
                  public void onClick(View v) {
                      adapter.remove(position);
                  }
              });
  
      }
  
      @Override
      public int getItemCount() {
          if (list == null)
              return 0;
          else
              return list.size();
      }
  
  
      class MyViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
          ImageView img, ten, five,del;
  
          public MyViewHolder(View itemView) {
              super(itemView);
              itemView.setOnClickListener(this);
              del = (ImageView) itemView.findViewById(R.id.del);
          }
  
      }
  }
  </code></pre>
  
  <p>Where is the problem ? </p>