-3

How can i achieve the following recyclerview header animation which sticks to the top and updates on scroll? Please see the below gif to get an idea.

enter image description here

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
charan reddy
  • 38
  • 1
  • 8

1 Answers1

0

Idk if there is a better solution but what comes to mind to me is, create a TextView where a header would be (above recyclerview), and create an anchor (some value) in every header that you would like to display the name off. When the header is off the screen (negative value for y axis) change the name of the TextView. Or maybe you can check if view is still visible, haven't worked with RV in a while, but hopefully you get an idea :)

Nemanja
  • 211
  • 6
  • 16
  • can u elaborate on this? Like provide some code. So that i can clearly get the idea. I tried your way. But im not able to get it to work – charan reddy Aug 09 '18 at 21:32