Reputation: 567
I want a horizontal scrollable gridview. So I'm using RecyclerView with GridLayoutManager. Here is my GridLayoutManager
GridLayoutManager(this, 2, GridLayoutManager.HORIZONTAL, false)
The problem is it populates items like this
1 3 5
2 4 6
but I want it this way
1 2 3
4 5 6
Is there any way to do this?
Upvotes: 0
Views: 266
Reputation: 116
Use this code
recyclerView.setLayoutManager(new GridLayoutManager(this, 3));
Upvotes: 1