[Sliding left takes to next page of results and sliding right takes to prev page of results (of the same search), dashes at the bottom shows the page position please look into the png]
Asked
Active
Viewed 781 times
-2
-
I have been trying from 2 days still no luck the question I ahve asked is very clear right recyclerview shouldnot scroll vertical – Chaitanya kumar Jun 30 '18 at 12:24
-
1Add your activity or fragment code with your adapter and layout file code. Then anyone can detect where's the problem. – Aditya Jun 30 '18 at 12:48
-
1Without code how anyone can predict what's the problem! – Aditya Jun 30 '18 at 12:48
-
Mr HeisenBrg I have attached an screenshot I doesnot even get the approach to complete have to use viewpager but how viewpager can be created dynamic I am just browsing for the solution didnt write any code tried other options like GridlayoutManager,Pagersnaphelper but nothing helps me – Chaitanya kumar Jun 30 '18 at 12:54
-
1Sorry, I can't understand what are you saying. – Aditya Jun 30 '18 at 12:57
-
Somebody has answered thanks for your time – Chaitanya kumar Jul 01 '18 at 07:34
1 Answers
2
If you know the number of elements per screen, you can use LinearLayout and add the elements to it at runtime. You anyway won't be recycling views if there is no scroll.
Even if you don't know the number of elements per screen, the next best thing to would be to calculate the number of elements you can completely fit by dividing the left over screen size by the size of one element.
For horizontal pages, you can make use of ViewPager.

Udit
- 1,037
- 6
- 11