Android使用gridlayoutmanager在recyclerview中的最后一个元素下方添加间距
我试图在增加最后一个元件行下面的间距RecyclerView有GridLayoutManager。ItemDecoration为此,我将custom用于底部填充,如下所示: public class SpaceItemDecoration extends RecyclerView.ItemDecoration { private int space; private int bottomSpace = 0; public SpaceItemDecoration(int space, int bottomSpace) { this.space = space; this.bottomSpace = bottomSpace; } public SpaceItemDecoration(int space) { this.space = space; this.bottomSpace = 0; } @Override public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) …