RecyclerView with vertical scrolling working fine. now i want that item of RecycelerView should be also scroll in horizontal direction in android. how is it possible?
Asked
Active
Viewed 2,553 times
2 Answers
0
You can set the LinearLayoutManager
to Horizontal
orientation ..
Try like this
recyclerView.setLayoutManager(
new LinearLayoutManager(Activity.this, LinearLayoutManager.HORIZONTAL, false));
Hope this helps
EDIT
Try this
There is FixedGridLayoutManager Which is scrollable in bothways. And also refer this

Sanoop Surendran
- 3,484
- 4
- 28
- 49
-
2i want vertical scrolling as well ad horizontal scrolling....the item of RecyclerView scroll in horizontal direction ...means one more list add which scroll in horizontal direction in item on RecyclerView.. – aj0822ArpitJoshi Jul 18 '16 at 13:04
-
Ok .. Refer [this](http://stackoverflow.com/questions/28886447/android-nested-recyclerview) – Sanoop Surendran Jul 18 '16 at 13:06
-
thanks Sanoop ..using this link my work has done.. good answer and thanks for help! – aj0822ArpitJoshi Jul 18 '16 at 13:41
-
3It's wrong answer. @aj0822 wants both scrolling, not only horizontal – sagus_helgy Nov 08 '16 at 20:30
-1
LinearLayoutManager layoutManager = ...
recyclerView.setLayoutManager(layoutManager);
when you want horizontal
layoutManager.setOrientation(context,LinearLayoutManager.HORIZONTAL,false);
when you want vertical
layoutManager.setOrientation(context,LinearLayoutManager.VERTICAL,false);

kiran kumar
- 1,402
- 17
- 34
-
2i want vertical scrolling as well ad horizontal scrolling....the item of RecyclerView scroll in horizontal direction ...means one more list add which scroll in horizontal direction in item on RecyclerView.. – aj0822ArpitJoshi Jul 18 '16 at 13:04
-