I'm trying to combine scale and translate animation but my image after these animations is fragmented
Animations
//TODO: **Translate**
val animatorLogoLoginTransaction = ObjectAnimator.ofFloat(
logoLogin,
View.TRANSLATION_Y,
-logoStateTopValue
)
animatorLogoLoginTransaction.startDelay = 500
animatorLogoLoginTransaction.duration = 1000
animatorLogoLoginTransaction.start()
//TODO: **Scale**
val scalaAnimation = val scalaAnimation = ScaleAnimation(1f,0.4f,1f,0.4f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f)
scalaAnimation.fillAfter = true
scalaAnimation.duration = 1000
logoLogin.startAnimation(scalaAnimation)
XML of my image view
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/logoLogin"
android:layout_width="wrap_content"
android:layout_height="300dp"
android:scaleType="fitStart"
android:layout_marginStart="16dp"
android:src="@drawable/vree_logo_large"
app:layout_constraintTop_toTopOf="@id/limitGuideLogo"
app:layout_constraintLeft_toLeftOf="parent"/>