How to arrange item in recyclerview?

Viewed 86

I am using GridLayoutManager in RecyclerView. My item are arranged as

a1 b1 c1
a2 b2 c2
a3 b3 c3

but I want to arrange like

a1 a2 a3
b1 b2 b3
c1 c2 c3
1 Answers

As My point of view, You have set orientation and reverselayout in GridLayoutManager, remove both of them and try like that

new GridLayoutManager(this, 3, GridLayoutManager.HORIZONTAL, true);

use it

new GridLayoutManager(this, 3);
Related