Skip to content

Instantly share code, notes, and snippets.

View fedotxxl's full-sized avatar

Fedor Belov fedotxxl

View GitHub Profile
@janheinrichmerker
janheinrichmerker / SpanningGridLayoutManager.java
Last active March 11, 2024 08:26
GridLayoutManager implementation that stretches to fit all grid items on screen and disables scrolling. Useful for dashboards etc.
package com.example;
import android.content.Context;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.ViewGroup;
public class SpanningGridLayoutManager extends GridLayoutManager {