From 5f00ed899e8018c744fe3e26c010adf7f95897e2 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 13 Jul 2024 17:15:23 -0600 Subject: [PATCH] Just use an alpha animation until we can perfect scale to avoid such a big UI change --- .../lagradost/cloudstream3/ui/download/DownloadAdapter.kt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/download/DownloadAdapter.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/download/DownloadAdapter.kt index a9c87be1..0ec9dd67 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/download/DownloadAdapter.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/download/DownloadAdapter.kt @@ -1,6 +1,5 @@ package com.lagradost.cloudstream3.ui.download -import android.animation.AnimatorSet import android.animation.ObjectAnimator import android.text.format.Formatter.formatShortFileSize import android.view.LayoutInflater @@ -342,11 +341,8 @@ class DownloadAdapter( } fun animateSelection(isSelected: Boolean) { - val scaleValue = if (isSelected) 0.95f else 1.0f - val scaleX = ObjectAnimator.ofFloat(itemView, View.SCALE_X, scaleValue) - val scaleY = ObjectAnimator.ofFloat(itemView, View.SCALE_Y, scaleValue) - AnimatorSet().apply { - playTogether(scaleX, scaleY) + val alphaValue = if (isSelected) 0.5f else 1.0f + ObjectAnimator.ofFloat(itemView, View.ALPHA, alphaValue).apply { duration = 200 start() }