Skip to content

Commit

Permalink
Allow add and remove delay overrides.
Browse files Browse the repository at this point in the history
  • Loading branch information
inv3rse committed Dec 29, 2023
1 parent 6c5c774 commit 93fe66a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ abstract class BaseItemAnimator : SimpleItemAnimator() {
return true
}

protected fun getRemoveDelay(holder: RecyclerView.ViewHolder): Long {
protected open fun getRemoveDelay(holder: RecyclerView.ViewHolder): Long {
return abs(holder.oldPosition * removeDuration / 4)
}

Expand All @@ -242,7 +242,7 @@ abstract class BaseItemAnimator : SimpleItemAnimator() {
return true
}

protected fun getAddDelay(holder: RecyclerView.ViewHolder): Long {
protected open fun getAddDelay(holder: RecyclerView.ViewHolder): Long {
return abs(holder.adapterPosition * addDuration / 4)
}

Expand Down

0 comments on commit 93fe66a

Please sign in to comment.