使用RecyclerView实现列表item重叠效果
实现:
rvDzRs.addItemDecoration(new RecyclerView.ItemDecoration() { @Override public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) { super.getItemOffsets(outRect, view, parent, state); if (parent.getChildPosition(view) != (0)) { outRect.left = -20; } } });