I have recyclerview with GridLayoutManager and I want 2 things:
- 3 items in screen
- horizontal scroll
Issue
If I don't use horizontal scroll I can have 3 items in screen but yeah it's not horizontal, but if I add horizontal option to GridLayoutManager
then it does not show 3 items in screen row.
Current code that gives me 3 items in row (but it's vertical)
laundriesRecycler.layoutManager = GridLayoutManager(context, 3)
Testing code that gives me horizontal scroll but not 3 items in row
laundriesRecycler.layoutManager = GridLayoutManager(context, 3, GridLayoutManager.HORIZONTAL, false)
layoutManager code
laundriesRecycler.layoutManager = GridLayoutManager(context, 3)
laundriesRecycler.adapter = NearLaundriesAdapter(context, list, useraddress)