aboutsummaryrefslogtreecommitdiff
path: root/adapter
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-10-19 22:30:16 -0700
committerAllan Wang <me@allanwang.ca>2019-10-19 22:31:14 -0700
commit7007e61879bf33c09115b5d8bc16f27af2731045 (patch)
tree19bc5e07f16ce1b6b9d13c711fed5160e25bc3ad /adapter
parent63f920c3257e955da1ef63c91f8b5e2de5478e55 (diff)
downloadkau-7007e61879bf33c09115b5d8bc16f27af2731045.tar.gz
kau-7007e61879bf33c09115b5d8bc16f27af2731045.tar.bz2
kau-7007e61879bf33c09115b5d8bc16f27af2731045.zip
Convert java math to kotlin math
Diffstat (limited to 'adapter')
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/animators/KauAnimator.kt3
1 files changed, 2 insertions, 1 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 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 {