简体   繁体   中英

android animate recycler view first item

I'm trying to do a recycler view animation on scroll, but im struggling to get it started.

Basically, the animation will happen on scroll and always on the first visible child (and only on this one). When the user scrolls the recycler view, second item should overlap the first, and the first will slowly fade out. reverse animation when sliding down.

In short, when the list scroll top for example, when the first item goes offscreen and want to change that behaviour. Instead of going offscreen, it slowly fades based on scroll dY and stay in the same position.

Any hints would be much appreciated.

I think this answer may can help you. I used code like this in my app and work smootly.

https://stackoverflow.com/a/29714138/2971619

Hope to be usefull for you too!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM