From 48213d0b427c478865c75fee912ff1ae8bbaffb5 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 31 Jul 2017 23:02:01 -0700 Subject: Major update to core and kotterknife; create mediapicker (#15) * Readme * Fix kau direction bits * Truly support transparent ripples * Update changelog * Test rect as base * Replace fab transition with generic fade scale transition * Add scalexy func * Add scaleXY * Add arguments to fadeScaleTransition * Clean up ink indicator * Create setOnSingleTapListener * Fix lint and add rndColor * Create kotterknife resettables * Add readme and missing object * Create lazy resettable registered * Update core docs * Opt for separate class for resettable registry * Clean up resettable registry * Rename functions * Add ripple callback listener * Adjust kprefactivity desc color * Add more transitions * Add delete keys option * Add instrumentation tests * switch id * Revert automatic instrumental tests * Generify imagepickercore and prepare video alternative * Create working video picker * Address possible null issue * Update searchview * Make layouts public * Add changelog test * Update logo link * Add custom color gif --- .../ca/allanwang/kau/animators/FadeScaleAnimator.kt | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'adapter/src/main') diff --git a/adapter/src/main/kotlin/ca/allanwang/kau/animators/FadeScaleAnimator.kt b/adapter/src/main/kotlin/ca/allanwang/kau/animators/FadeScaleAnimator.kt index cc73100..bf38cac 100644 --- a/adapter/src/main/kotlin/ca/allanwang/kau/animators/FadeScaleAnimator.kt +++ b/adapter/src/main/kotlin/ca/allanwang/kau/animators/FadeScaleAnimator.kt @@ -3,6 +3,7 @@ package ca.allanwang.kau.animators import android.support.v7.widget.RecyclerView import android.view.View import android.view.ViewPropertyAnimator +import ca.allanwang.kau.utils.scaleXY /** * Created by Allan Wang on 2017-07-11. @@ -10,20 +11,17 @@ import android.view.ViewPropertyAnimator class FadeScaleAnimatorAdd(val scaleFactor: Float = 1.0f, override var itemDelayFactor: Float = 0.125f) : KauAnimatorAdd { override fun animationPrepare(holder: RecyclerView.ViewHolder): View.() -> Unit = { - scaleX = scaleFactor - scaleY = scaleFactor + scaleXY = scaleFactor alpha = 0f } override fun animation(holder: RecyclerView.ViewHolder): ViewPropertyAnimator.() -> Unit = { - scaleX(1f) - scaleY(1f) + scaleXY(1f) alpha(1f) } override fun animationCleanup(holder: RecyclerView.ViewHolder): View.() -> Unit = { - scaleX = 1f - scaleY = 1f + scaleXY = 1f alpha = 1f } @@ -34,14 +32,12 @@ class FadeScaleAnimatorAdd(val scaleFactor: Float = 1.0f, override var itemDelay class FadeScaleAnimatorRemove(val scaleFactor: Float = 1.0f, override var itemDelayFactor: Float = 0.125f) : KauAnimatorRemove { override fun animation(holder: RecyclerView.ViewHolder): ViewPropertyAnimator.() -> Unit = { - scaleX(scaleFactor) - scaleY(scaleFactor) + scaleXY(scaleFactor) alpha(0f) } override fun animationCleanup(holder: RecyclerView.ViewHolder): View.() -> Unit = { - scaleX = 1f - scaleY = 1f + scaleXY = 1f alpha = 1f } -- cgit v1.2.3