You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
reuse ViewPropertyAnimator object
This is needed to make sure we don't call outdated AnimatorListeners
This commit is contained in:
@@ -1428,8 +1428,11 @@ public class View implements Drawable.Callback {
|
||||
|
||||
public void clearAnimation() {}
|
||||
|
||||
private ViewPropertyAnimator viewPropertyAnimator;
|
||||
public ViewPropertyAnimator animate() {
|
||||
return new ViewPropertyAnimator(this);
|
||||
if (viewPropertyAnimator == null)
|
||||
viewPropertyAnimator = new ViewPropertyAnimator(this);
|
||||
return viewPropertyAnimator;
|
||||
}
|
||||
|
||||
public float getTranslationX() {return 0.f;}
|
||||
|
||||
Reference in New Issue
Block a user