Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

IshRoid ishroid

🏠
Working from home
View GitHub Profile
@yqritc
yqritc / gist:ccca77dc42f2364777e1
Last active Sep 20, 2021
Equal column spacing for Android RecyclerView GridLayoutManager by using custom ItemDecoration
View gist:ccca77dc42f2364777e1

ItemOffsetDecoration

public class ItemOffsetDecoration extends RecyclerView.ItemDecoration {

    private int mItemOffset;

    public ItemOffsetDecoration(int itemOffset) {
        mItemOffset = itemOffset;
    }