mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Just use an alpha animation until we can perfect scale to avoid such a big UI change
This commit is contained in:
parent
bb8f1c610e
commit
5f00ed899e
1 changed files with 2 additions and 6 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue