davideas/FlexibleAdapter

Wrong scroll animation start delay calculation for first invisible item

Open

#306 创建于 2017年3月1日

在 GitHub 查看
 (7 评论) (0 反应) (0 负责人)Java (3,534 star) (553 fork)batch import
bughelp wanted

描述

There is a problem for scroll animations with start delay for each item. First invisible item has higher delay then next items and as a result second and next items appear before first item. It depends on scroll position so not always can be reproduced. Rather for small invisible items left then long list. See pictures below.

second_item_already_animated

first_item_animated_after_next_items

I think it's becouse of wrong IF condition for "Normal Forward scrolling after max itemOnScreen is reached" in AnimatorAdapter.calculateAnimationDelay(int position) method.

Instead of "if (mMaxChildViews == 0 || visibleItems < numberOfAnimatedItems ||" there should be "if (mMaxChildViews == 0 || visibleItems <= numberOfAnimatedItems ||"

Let me know if I can fork your repository, pull request this fix or you can do it by yourself. Would it be possible to generate new lib release with this fix?

贡献者指南