GridAutofitLayoutManager

public class GridAutofitLayoutManager extends GridLayoutManager

Fields

mColumnWidthChanged

protected boolean mColumnWidthChanged

mColumnWidthPx

protected float mColumnWidthPx

mIsSpanCountChanged

protected boolean mIsSpanCountChanged

mSpanCount

protected int mSpanCount

mSpanCountListener

protected OnChangeSpanCountListener mSpanCountListener

mWidth

protected int mWidth

mWidthChanged

protected boolean mWidthChanged

Constructors

GridAutofitLayoutManager

public GridAutofitLayoutManager(Context context, float columnWidthPx)

GridAutofitLayoutManager

public GridAutofitLayoutManager(Context context, float columnWidthPx, int orientation, boolean reverseLayout)

Methods

checkedColumnWidth

protected float checkedColumnWidth(Context context, float columnWidthPx)

onLayoutChildren

public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state)

onLayoutCompleted

public void onLayoutCompleted(RecyclerView.State state)

setColumnWidthPx

public void setColumnWidthPx(float newColumnWidthPx)

setSpanCountListener

public void setSpanCountListener(OnChangeSpanCountListener spanCountListener)