Reputation: 53
have anyone done the same layout as fig. 1? i am currently using StaggeredGridLayoutManager but the result is fig 2. could anyone help me regarding this?
Ps tried using grid layout but it just copy the height of the largest height
Upvotes: 0
Views: 443
Reputation: 9225
Use GridLayoutManager
instead of StaggeredGridLayoutManager
for achieving same layout as fig. 1
GridLayoutManager
creates the equal height grids.
val gridLayoutManager = GridLayoutManager(this, 2)
recyclerview.layoutManager = gridLayoutManager
Upvotes: 2