From ff6a1259134d8d2ae9297ce97b01e3d0389fe3a7 Mon Sep 17 00:00:00 2001 From: firelight <147925818+fire-light42@users.noreply.github.com> Date: Thu, 9 Jul 2026 15:09:03 +0000 Subject: [PATCH 1/2] Feat: Animation to actor adapter --- .../cloudstream3/ui/result/ActorAdaptor.kt | 21 +++++++++++++++++++ app/src/main/res/layout/cast_item.xml | 1 + 2 files changed, 22 insertions(+) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/result/ActorAdaptor.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/result/ActorAdaptor.kt index 056588d0b..dca7e1101 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/result/ActorAdaptor.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/result/ActorAdaptor.kt @@ -5,6 +5,9 @@ import android.content.Intent import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import android.view.animation.Animation +import android.view.animation.OvershootInterpolator +import android.view.animation.ScaleAnimation import androidx.core.view.isVisible import com.lagradost.cloudstream3.ActorData import com.lagradost.cloudstream3.ActorRole @@ -46,6 +49,24 @@ class ActorAdaptor( } } + override fun onUpdateContent(holder: ViewHolderState, item: ActorData, position: Int) { + when (val binding = holder.view) { + is CastItemBinding -> { + val anim: Animation = ScaleAnimation( + 0.8f, 1f, + 0.8f, 1f, + Animation.RELATIVE_TO_SELF, 0.5f, + Animation.RELATIVE_TO_SELF, 0.5f + ) + anim.fillAfter = true + anim.setDuration(200) + anim.interpolator = OvershootInterpolator() + binding.voiceActorImageHolder2.startAnimation(anim) + } + } + super.onUpdateContent(holder, item, position) + } + override fun onBindContent(holder: ViewHolderState, item: ActorData, position: Int) { when (val binding = holder.view) { is CastItemBinding -> { diff --git a/app/src/main/res/layout/cast_item.xml b/app/src/main/res/layout/cast_item.xml index 4f7bdf74d..610b4e3e4 100644 --- a/app/src/main/res/layout/cast_item.xml +++ b/app/src/main/res/layout/cast_item.xml @@ -47,6 +47,7 @@ Date: Thu, 9 Jul 2026 15:48:14 +0000 Subject: [PATCH 2/2] Update ActorAdaptor.kt --- .../java/com/lagradost/cloudstream3/ui/result/ActorAdaptor.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/result/ActorAdaptor.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/result/ActorAdaptor.kt index dca7e1101..fe8c617f2 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/result/ActorAdaptor.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/result/ActorAdaptor.kt @@ -59,7 +59,7 @@ class ActorAdaptor( Animation.RELATIVE_TO_SELF, 0.5f ) anim.fillAfter = true - anim.setDuration(200) + anim.duration = 200 anim.interpolator = OvershootInterpolator() binding.voiceActorImageHolder2.startAnimation(anim) } @@ -158,4 +158,4 @@ class ActorAdaptor( } } } -} \ No newline at end of file +}