|
@@ -1,9 +1,11 @@
|
1
|
1
|
package com.reactnativenavigation.views.element.animators;
|
2
|
2
|
|
3
|
3
|
import android.animation.Animator;
|
|
4
|
+import android.graphics.Point;
|
4
|
5
|
import android.widget.TextView;
|
5
|
6
|
|
6
|
7
|
import com.facebook.react.views.text.ReactTextView;
|
|
8
|
+import com.reactnativenavigation.utils.ViewUtils;
|
7
|
9
|
import com.reactnativenavigation.views.element.Element;
|
8
|
10
|
import com.shazam.android.widget.text.reflow.ReflowTextAnimatorHelper;
|
9
|
11
|
|
|
@@ -17,7 +19,10 @@ public class TextChangeAnimator extends PropertyAnimatorCreator<ReactTextView> {
|
17
|
19
|
|
18
|
20
|
@Override
|
19
|
21
|
protected boolean shouldAnimateProperty(ReactTextView fromChild, ReactTextView toChild) {
|
20
|
|
- return getTextSize(fromChild) != getTextSize(toChild);
|
|
22
|
+ Point fromXy = ViewUtils.getLocationOnScreen(from.getChild());
|
|
23
|
+ Point toXy = ViewUtils.getLocationOnScreen(to.getChild());
|
|
24
|
+ return getTextSize(fromChild) != getTextSize(toChild) ||
|
|
25
|
+ !fromXy.equals(toXy.x, toXy.y);
|
21
|
26
|
}
|
22
|
27
|
|
23
|
28
|
@Override
|