5

enter image description here

I'm trying to change the tab as we scroll through the recycler view.

I have listed the items in single recycler view.

So when i reach the header ( for example Breakfast then Breakfast tab should be active ) of each section how to change tab accordingly?

The above gif explains my query. Please suggest me a solution.

Lano Angel
  • 299
  • 5
  • 18
  • You will have to get visible record from recyclerview onScroll and then check the record item until you reach Breakfast record and then change the tab to Breakfast thats it.. Have a look for example https://stackoverflow.com/q/34586637/6945674 – Vijay Singh Chouhan Mar 12 '19 at 12:52
  • 1
    Instead of using multiple fragments, you have to use segmented recycler view and then change tab on `onScroll` according to visible recycler view section. – Aditya Mar 12 '19 at 12:53
  • Did you find a solution to this problem – Jasurbek May 16 '20 at 00:50
  • hi bro did you find any solution ? – Dixit Patel Jul 16 '20 at 11:35
  • No bro, I don't do app development anymore :D. I think by now there will be other solutions to this. – Lano Angel Nov 29 '21 at 15:38

0 Answers0