RecyclerView remove divider / decorator after the last item
Try this Code, it won’t show divider for the last item. This method will give you more control over drawing divider. public class DividerItemDecorator extends RecyclerView.ItemDecoration { private Drawable mDivider; public DividerItemDecorator(Drawable divider) { mDivider = divider; } @Override public void onDrawOver(Canvas canvas, RecyclerView parent, RecyclerView.State state) { int dividerLeft = parent.getPaddingLeft(); int dividerRight = … Read more