How do I set up the Grid Layout Manager to view Recyclers?
I have successfully implemented a recycler view with a scale layout layout 2. Now I want to implement something like the picture below. To do this, I need to set up the grid layout manager so that the number of periods for 1 element is 1, and for the rest - 2. Is this possible.
+3
Prince bansal
source
to share
1 answer
Use setSpanSizeLookup
to provide this information to the layout manager.
see docs here: https://developer.android.com/reference/android/support/v7/widget/GridLayoutManager.html
+5
yigit
source
to share