From 7007e61879bf33c09115b5d8bc16f27af2731045 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 19 Oct 2019 22:30:16 -0700 Subject: Convert java math to kotlin math --- adapter/src/main/kotlin/ca/allanwang/kau/animators/KauAnimator.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'adapter/src') 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 b9df946..935c484 100644 --- a/adapter/src/main/kotlin/ca/allanwang/kau/animators/KauAnimator.kt +++ b/adapter/src/main/kotlin/ca/allanwang/kau/animators/KauAnimator.kt @@ -19,6 +19,7 @@ import android.view.ViewPropertyAnimator import androidx.recyclerview.widget.RecyclerView import ca.allanwang.kau.utils.KAU_BOTTOM import ca.allanwang.kau.utils.KAU_RIGHT +import kotlin.math.max /** * Created by Allan Wang on 2017-06-27. @@ -30,7 +31,7 @@ open class KauAnimator( ) : BaseItemAnimator() { open fun startDelay(holder: RecyclerView.ViewHolder, duration: Long, factor: Float) = - Math.max(0L, (holder.adapterPosition * duration * factor).toLong()) + max(0L, (holder.adapterPosition * duration * factor).toLong()) override fun removeAnimation(holder: RecyclerView.ViewHolder): ViewPropertyAnimator { return holder.itemView.animate().apply { -- cgit v1.2.3