diff options
Diffstat (limited to 'adapter')
-rw-r--r-- | adapter/src/main/kotlin/ca/allanwang/kau/animators/KauAnimator.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/adapter/src/main/kotlin/ca/allanwang/kau/animators/KauAnimator.kt b/adapter/src/main/kotlin/ca/allanwang/kau/animators/KauAnimator.kt index 5b36551..9e52aac 100644 --- a/adapter/src/main/kotlin/ca/allanwang/kau/animators/KauAnimator.kt +++ b/adapter/src/main/kotlin/ca/allanwang/kau/animators/KauAnimator.kt @@ -8,13 +8,13 @@ import ca.allanwang.kau.utils.KAU_RIGHT /** * Created by Allan Wang on 2017-06-27. */ -class KauAnimator( +open class KauAnimator( val addAnimator: KauAnimatorAdd = SlideAnimatorAdd(KAU_BOTTOM), val removeAnimator: KauAnimatorRemove = SlideAnimatorRemove(KAU_RIGHT), val changeAnimator: KauAnimatorChange = FadeAnimatorChange() ) : BaseItemAnimator() { - fun startDelay(holder: RecyclerView.ViewHolder, duration: Long, factor: Float) + open fun startDelay(holder: RecyclerView.ViewHolder, duration: Long, factor: Float) = Math.max(0L, (holder.adapterPosition * duration * factor).toLong()) override fun removeAnimation(holder: RecyclerView.ViewHolder): ViewPropertyAnimator { |