OSDN Git Service

Cancel running LayoutTransition before removing it from a container
authorChet Haase <chet@google.com>
Wed, 21 Aug 2013 21:01:02 +0000 (14:01 -0700)
committerChet Haase <chet@google.com>
Wed, 21 Aug 2013 21:01:02 +0000 (14:01 -0700)
commitef3cbfd4c42719d3e4feabb74c08f0311066c194
tree1411335a915e4a5c646a7b0b5a7e76a1db684ac0
parentb3acd8ef263e17879e9a13c3dacd123bd0670c3b
Cancel running LayoutTransition before removing it from a container

Previously, setting a new LayoutTransition object on a container would
not do anything to the old transition object (if it existed). This means
that the previous transition could be mid-flight, changing stuff in that
container, and would continue doing so even after it was removed.
This could cause artifacts like that in the bug below where views
that are fading out would be put in the containers "disappearing children"
list for the duration of the fade... and then would never be removed from
that list because the container was no longer connected to that transition.
This caused items to stay visible even after they were removed from
their parent containers.

Issue #10119571 LayoutTransitions sometimes does not honor view's visibility

Change-Id: I3efa4065e47fa97c4dd90410bbc1a0273c2b8079
core/java/android/view/ViewGroup.java