title: Grid Recyclerview gone item and there is a blank cell between two items
body: <p>I'm using a Grid recyclerview for divide column. When I set visibility of an item to Gone,i have a blank cell between two items.
  I don't want using remove item at position, just wanna set visibility for this item.
  Please check image: <a href="https://i.stack.imgur.com/dbC3T.png" rel="nofollow noreferrer">UI</a>
  When I hide no2, no3 layout should be move to no2. No5 and No6 the same.
  That is code:</p>
  
  <pre><code>@Override
  public void onBindViewHolder(final FeedItemViewHolder holder, final int position) {
             boolean ad = item.get(position);
              setVisibility(holder.itemView, ad);
              break;
  
      }
  }
  public void setVisibility(View view, boolean isVisible) {
      ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) view.getLayoutParams();
      if (isVisible) {
          int margin = (int) mContext.getResources().getDimension(R.dimen.feed_card_margin);
          params.height = LinearLayout.LayoutParams.WRAP_CONTENT;
          params.width = LinearLayout.LayoutParams.MATCH_PARENT;
          params.setMargins(margin, margin, margin, margin);
          view.setVisibility(View.VISIBLE);
      } else {
          view.setVisibility(View.GONE);
          params.setMargins(0, 0, 0, 0);
          params.height = 0;
          params.width = 0;
      }
      view.setLayoutParams(params);
  }
  </code></pre>
  
  <p>Any suggestion for this case? 
  Thanks!</p>