wasabeef / recyclerview-animators

An Android Animation library which easily add itemanimator to RecyclerView items.
Apache License 2.0
11.49k stars 1.98k forks source link

Option to disable the start delay #176

Open Boros122 opened 4 years ago

Boros122 commented 4 years ago

The library is very cool, but I have some problems when I use in a recycler view with infinite scroll. When new items added to recycler view at the bottom during infinite scroll, the animation duration getting bigger and bigger according to the item size of the recycler view. protected long getAddDelay(final RecyclerView.ViewHolder holder) { return Math.abs(holder.getAdapterPosition() * getAddDuration() / 4); } A more customisable delay manipulation will be a good extension for this library.

BehnamMaboodi commented 4 years ago

I faced a similar issue.
This is a serious problem and this library is not usable for an infinite scroll recycler view at all without this option. a better solution is to calculate the delay according to the number of items visible in the list, not the adapter position (which can easily get larger than 50).
the easiest option is to disable the delay completely by extending the desired item animator class in the end project.