Skip to content

Repository files navigation

GridViewPack

Following is the constructor for a GridLayoutManager.

GridLayoutManager (Contextcontext, intspanCount, intorientation, booleanreverseLayout)

Sample usage of GridLayoutManager:

/**AutoFitGridLayoutManager that auto fits the cells by the column width defined.**//*AutoFitGridLayoutManager layoutManager = new AutoFitGridLayoutManager(this, 500); recyclerView.setLayoutManager(layoutManager);*//**Simple GridLayoutManager that spans two columns**/GridLayoutManagermanager = newGridLayoutManager(this, 2, GridLayoutManager.VERTICAL, false);
recyclerView.setLayoutManager(manager);