Basically I'm trying to skip certain items of recyclerview by making that view's visibility GONE
by help of this SO
answer .It's working like a charm for the linear_recyclerview
without showing the blank space after skipping items but in case of grid_recyclerview
it's showing the vacant space . Can anyone please help me to resolve this issue.
Code:
if(position==0){
holder.itemView.setVisibility(View.GONE);
holder.itemView.setLayoutParams(new RecyclerView.LayoutParams(0, 0));
}