summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chet Haase <chet@google.com> 2012-06-19 13:54:29 -0700
committer Chet Haase <chet@google.com> 2012-06-19 15:39:16 -0700
commitddbb346e5a08c94dca44d681af53f0d9dc75cadf (patch)
treee0274b333ee2a0c86e73ddd20619ebc0e62e5b1c
parentfe54cb6f3da7fe95d5141d97b0c6780e001ad058 (diff)
Handle non-started LayoutTransition animations correctly
A recent change to LayoutTransition noop'd animations in non-visible parents, to avoid artifacts like scaling/moving from (0,0,0,0). But there was logic in ViewGroup that didn't account for transitions that didn't actually run an animation, causing a disconnect between the state of a parent (getting ready to remove an item later) and the state of the transition (not running, therefore not needing the child to be removed later). The fix was to detect when the transition did not start and avoid adding the view to the list of children to be removed later. Issue #6602502 Playing video through crackle application only audio is heard no video is displayed Change-Id: Id5260580ab0d6dd165c62006c7bd579fd821a5f5
-rw-r--r--core/java/android/view/ViewGroup.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index e7b0e7876f72..044627c32fca 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -997,13 +997,13 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
mTransition.showChild(this, child, oldVisibility);
} else {
mTransition.hideChild(this, child, newVisibility);
- // Only track this on disappearing views - appearing views are already visible
- // and don't need special handling during drawChild()
- if (mVisibilityChangingChildren == null) {
- mVisibilityChangingChildren = new ArrayList<View>();
- }
- mVisibilityChangingChildren.add(child);
if (mTransitioningViews != null && mTransitioningViews.contains(child)) {
+ // Only track this on disappearing views - appearing views are already visible
+ // and don't need special handling during drawChild()
+ if (mVisibilityChangingChildren == null) {
+ mVisibilityChangingChildren = new ArrayList<View>();
+ }
+ mVisibilityChangingChildren.add(child);
addDisappearingView(child);
}
}