File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
core/java/android/animation Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -657,6 +657,15 @@ public void setAnimateParentHierarchy(boolean animateParentHierarchy) {
657657 */
658658 private void setupChangeAnimation (final ViewGroup parent , final int changeReason ,
659659 Animator baseAnimator , final long duration , final View child ) {
660+
661+ // If we already have a listener for this child, then we've already set up the
662+ // changing animation we need. Multiple calls for a child may occur when several
663+ // add/remove operations are run at once on a container; each one will trigger
664+ // changes for the existing children in the container.
665+ if (layoutChangeListenerMap .get (child ) != null ) {
666+ return ;
667+ }
668+
660669 // Make a copy of the appropriate animation
661670 final Animator anim = baseAnimator .clone ();
662671
You can’t perform that action at this time.
0 commit comments