aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-07-01 13:47:41 -0700
committerAllan Wang <me@allanwang.ca>2019-07-01 13:47:41 -0700
commitf264bc4735e6d1aa9f9683f56b3c5f6e05c5a20b (patch)
tree676cb16cd4c8d1c4bdb2d7183cef36f637852619
parent8c259e6acc283e50348a8f8825504eed482bf610 (diff)
downloadkau-f264bc4735e6d1aa9f9683f56b3c5f6e05c5a20b.tar.gz
kau-f264bc4735e6d1aa9f9683f56b3c5f6e05c5a20b.tar.bz2
kau-f264bc4735e6d1aa9f9683f56b3c5f6e05c5a20b.zip
Make noanimatorchange an object, resolves #212
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/AboutPanelDelegate.kt2
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/animators/NoAnimator.kt2
2 files changed, 2 insertions, 2 deletions
diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/AboutPanelDelegate.kt b/about/src/main/kotlin/ca/allanwang/kau/about/AboutPanelDelegate.kt
index 924a771..a5d9c17 100644
--- a/about/src/main/kotlin/ca/allanwang/kau/about/AboutPanelDelegate.kt
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/AboutPanelDelegate.kt
@@ -100,7 +100,7 @@ abstract class AboutPanelRecycler : AboutPanelContract {
recycler.adapter = adapter
recycler.itemAnimator = KauAnimator(
addAnimator = FadeScaleAnimatorAdd(scaleFactor = 0.7f, itemDelayFactor = 0.2f),
- changeAnimator = NoAnimatorChange()
+ changeAnimator = NoAnimatorChange
).apply { addDuration = 300; interpolator = AnimHolder.decelerateInterpolator(recycler.context) }
}
diff --git a/adapter/src/main/kotlin/ca/allanwang/kau/animators/NoAnimator.kt b/adapter/src/main/kotlin/ca/allanwang/kau/animators/NoAnimator.kt
index cca8a25..52b6123 100644
--- a/adapter/src/main/kotlin/ca/allanwang/kau/animators/NoAnimator.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/animators/NoAnimator.kt
@@ -42,7 +42,7 @@ class NoAnimatorRemove(override var itemDelayFactor: Float = 0f) : KauAnimatorRe
override fun getDelay(remove: Long, move: Long, change: Long): Long = 0L
}
-class NoAnimatorChange : KauAnimatorChange {
+object NoAnimatorChange : KauAnimatorChange {
override fun changeOldAnimation(
holder: RecyclerView.ViewHolder,