aboutsummaryrefslogtreecommitdiff
path: root/adapter/src/main/kotlin/ca/allanwang/kau/animators/AnimatorInterfaces.kt
diff options
context:
space:
mode:
Diffstat (limited to 'adapter/src/main/kotlin/ca/allanwang/kau/animators/AnimatorInterfaces.kt')
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/animators/AnimatorInterfaces.kt31
1 files changed, 31 insertions, 0 deletions
diff --git a/adapter/src/main/kotlin/ca/allanwang/kau/animators/AnimatorInterfaces.kt b/adapter/src/main/kotlin/ca/allanwang/kau/animators/AnimatorInterfaces.kt
new file mode 100644
index 0000000..3cf13df
--- /dev/null
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/animators/AnimatorInterfaces.kt
@@ -0,0 +1,31 @@
+package ca.allanwang.kau.animators
+
+import android.support.v7.widget.RecyclerView
+import android.view.View
+import android.view.ViewPropertyAnimator
+
+/**
+ * Created by Allan Wang on 2017-07-11.
+ */
+class KauAnimatorException(message: String) : RuntimeException(message)
+
+interface KauAnimatorAdd {
+ fun animationPrepare(holder: RecyclerView.ViewHolder): View.() -> Unit
+ fun animation(holder: RecyclerView.ViewHolder): ViewPropertyAnimator.() -> Unit
+ fun animationCleanup(holder: RecyclerView.ViewHolder): View.() -> Unit
+ fun getDelay(remove: Long, move: Long, change: Long): Long
+ var itemDelayFactor: Float
+}
+
+interface KauAnimatorRemove {
+ fun animation(holder: RecyclerView.ViewHolder): ViewPropertyAnimator.() -> Unit
+ fun animationCleanup(holder: RecyclerView.ViewHolder): View.() -> Unit
+ fun getDelay(remove: Long, move: Long, change: Long): Long
+ var itemDelayFactor: Float
+}
+
+interface KauAnimatorChange {
+ fun changeOldAnimation(holder: RecyclerView.ViewHolder, changeInfo: BaseItemAnimator.ChangeInfo): ViewPropertyAnimator.() -> Unit
+ fun changeNewAnimation(holder: RecyclerView.ViewHolder): ViewPropertyAnimator.() -> Unit
+ fun changeAnimationCleanup(holder: RecyclerView.ViewHolder): View.() -> Unit
+}