mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
revert back last CrossFadeChangeHandler change
forgot how ObjectAnimator worked for a bit there
This commit is contained in:
parent
3a6e50f169
commit
48b8eae907
1 changed files with 1 additions and 7 deletions
|
@ -3,7 +3,6 @@ package eu.kanade.tachiyomi.ui.base.controller
|
||||||
import android.animation.Animator
|
import android.animation.Animator
|
||||||
import android.animation.AnimatorSet
|
import android.animation.AnimatorSet
|
||||||
import android.animation.ObjectAnimator
|
import android.animation.ObjectAnimator
|
||||||
import android.os.Build
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import com.bluelinelabs.conductor.ControllerChangeHandler
|
import com.bluelinelabs.conductor.ControllerChangeHandler
|
||||||
|
@ -42,12 +41,7 @@ class CrossFadeChangeHandler : AnimatorChangeHandler {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (from != null) {
|
if (from != null) {
|
||||||
val start = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE && from.translationX != 0f) {
|
animatorSet.play(ObjectAnimator.ofFloat(from, View.TRANSLATION_X, from.width.toFloat() * 0.2f))
|
||||||
from.translationX
|
|
||||||
} else {
|
|
||||||
from.width.toFloat() * 0.2f
|
|
||||||
}
|
|
||||||
animatorSet.play(ObjectAnimator.ofFloat(from, View.TRANSLATION_X, start))
|
|
||||||
}
|
}
|
||||||
if (to != null) {
|
if (to != null) {
|
||||||
// Allow this to have a nice transition when coming off an aborted push animation or
|
// Allow this to have a nice transition when coming off an aborted push animation or
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue