Recyclerview - Overlap items bottom to top
<p>I have set the negative margin for items like this:-</p>

<p><strong>ItemDecoration.java</strong></p>

<pre><code>public class ItemDecorator extends RecyclerView.ItemDecoration {
    private final int mSpace;

    public ItemDecorator(int space) {
        this.mSpace = space;
    }

    @Override
    public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
        int position = parent.getChildAdapterPosition(view);
        if (position != 0)
            outRect.top = mSpace;
    }
}
</code></pre>

<p><strong>MainActivity.java</strong></p>

<pre><code>recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.addItemDecoration(new ItemDecorator(-80));
</code></pre>

<p>This causes top item to stack lowest and next item after the top item overlaps it. I want top item to overlap its next item and so on.</p>

<p><strong>Current View</strong></p>

<p><a href="https://i.stack.imgur.com/zKcsD.png" rel="noreferrer"><img src="https://i.stack.imgur.com/zKcsD.png" alt="enter image description here"></a></p>

<p><strong>Required View</strong></p>

<p><a href="https://i.stack.imgur.com/eQoEJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/eQoEJ.png" alt="enter image description here"></a></p>