From a436e21866fa64726eae9e15fa677675c0298bbb Mon Sep 17 00:00:00 2001 From: Guy Carmeli Date: Mon, 24 Aug 2020 18:53:46 +0300 Subject: [PATCH] Use correct ScaleType when animating same element multiple times When animating images in shared element transition, we change their ScaleType to an InterpolatingScaleType. At the end of the animation we need to restore the ScaleType back to its original value but for some reason this doesn't seem to work. The current solution recursively find the original scale type used for the destination image. Related to #6505 --- .../views/element/animators/MatrixAnimator.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/android/app/src/main/java/com/reactnativenavigation/views/element/animators/MatrixAnimator.kt b/lib/android/app/src/main/java/com/reactnativenavigation/views/element/animators/MatrixAnimator.kt index 260e9170926..5f4c8301645 100644 --- a/lib/android/app/src/main/java/com/reactnativenavigation/views/element/animators/MatrixAnimator.kt +++ b/lib/android/app/src/main/java/com/reactnativenavigation/views/element/animators/MatrixAnimator.kt @@ -42,8 +42,12 @@ class MatrixAnimator(from: View, to: View) : PropertyAnimatorCreator