I have set the negative margin for items like this:-
ItemDecoration.java
public class ItemDecorator extends RecyclerView.ItemDecorat
Try overriding this method.
@Override public int getItemViewType(int position) { return super.getItemViewType(position); }