summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2011-06-17 12:13:42 -0700
committerChet Haase <chet@google.com>2011-06-17 14:35:09 -0700
commitc8a9a70c5fe1be7e22f861f40b8cf3a9cf147cb2 (patch)
tree76626c4f1a831fff862de1c0388d8b3bb14d81c8
parentb86b030acdaeb1d823ee3c67609516160975824e (diff)
downloadframeworks_base-c8a9a70c5fe1be7e22f861f40b8cf3a9cf147cb2.zip
frameworks_base-c8a9a70c5fe1be7e22f861f40b8cf3a9cf147cb2.tar.gz
frameworks_base-c8a9a70c5fe1be7e22f861f40b8cf3a9cf147cb2.tar.bz2
Invisible views can't start animations
The invalidation logic was broken for invisible views, causing a problem when an animation was set to start on an invisible view (to fade it in), but the view would not propagate the invalidation event that would trigger the start of the animation rendering. Fix: reset the DRAWN flag when a view becomes invisible to allow the invalidation logic to work as intended. Change-Id: Ibf49c6e8b39506a92a6e5f45cb8a12626ae4f931
-rw-r--r--core/java/android/view/View.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index b0e651a..eb0b7d0 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -6089,7 +6089,11 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
/* Check if the VISIBLE bit has changed */
if ((changed & INVISIBLE) != 0) {
needGlobalAttributesUpdate(false);
- invalidate(true);
+ /*
+ * If this view is becoming invisible, set the DRAWN flag so that
+ * the next invalidate() will not be skipped.
+ */
+ mPrivateFlags |= DRAWN;
if (((mViewFlags & VISIBILITY_MASK) == INVISIBLE) && hasFocus()) {
// root view becoming invisible shouldn't clear focus