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.
Asked
Active
Viewed 91 times
-3
-
@CommonsWare please try to help – charan reddy Aug 09 '18 at 20:38
-
@Marcin Orlowski How did i spam? – charan reddy Aug 09 '18 at 21:00
-
try this https://github.com/bgogetap/StickyHeaders – prashant17 Aug 10 '18 at 10:41
1 Answers
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