Reputation: 1655
I have successfully implemented a recycler view with the grid layout manner of span count 2. Now i want to implement something like in the below picture. For this i need to customize my grid layout manager such that the span count for 1 element is 1 and for rest all it is 2. Is there anyway possible.
Upvotes: 3
Views: 6371
Reputation: 38273
Use setSpanSizeLookup
to provide this information to the layout manager.
see docs here: https://developer.android.com/reference/android/support/v7/widget/GridLayoutManager.html
Upvotes: 5