Issue
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

Solution
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
Answered By - Android Geek
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.