From 159a875f10760b0f2da853a014df189ac34beb47 Mon Sep 17 00:00:00 2001 From: He4eT Date: Sat, 28 Dec 2024 20:50:54 +0100 Subject: [PATCH] Appearance: tune animations --- app/src/main/java/eu/ottop/yamlauncher/utils/Animations.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/eu/ottop/yamlauncher/utils/Animations.kt b/app/src/main/java/eu/ottop/yamlauncher/utils/Animations.kt index a0b3c2d..020bdda 100644 --- a/app/src/main/java/eu/ottop/yamlauncher/utils/Animations.kt +++ b/app/src/main/java/eu/ottop/yamlauncher/utils/Animations.kt @@ -118,12 +118,10 @@ class Animations (context: Context) { private fun View.fadeIn(duration: Long = sharedPreferenceManager.getAnimationSpeed()) { if (visibility != View.VISIBLE) { alpha = 0f - translationY = -height.toFloat()/100 visibility = View.VISIBLE animate() .alpha(1f) - .translationY(0f) .setDuration(duration) .setListener(null) } @@ -131,12 +129,12 @@ class Animations (context: Context) { private fun View.fadeOut() { if (visibility == View.VISIBLE) { + alpha = 0f isInAnim = true val duration = sharedPreferenceManager.getAnimationSpeed() animate() .alpha(0f) - .translationY(-height.toFloat()/100) .setDuration(duration/2) .setListener(object : AnimatorListenerAdapter() { override fun onAnimationEnd(animation: Animator) {