summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Milne <pmilne@google.com>2011-07-19 14:14:34 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-19 14:14:34 -0700
commitee4a6478e23f400244cc8d71bff5f22d649cb409 (patch)
tree3c38ba15b26945e58d07169c0782070298a2d435
parent2af9e1f7b55463dc071881af1c4ed8d48c0d7289 (diff)
parent350f0a63c9e785304063a95a6df9e128a67ec64f (diff)
downloadframeworks_base-ee4a6478e23f400244cc8d71bff5f22d649cb409.zip
frameworks_base-ee4a6478e23f400244cc8d71bff5f22d649cb409.tar.gz
frameworks_base-ee4a6478e23f400244cc8d71bff5f22d649cb409.tar.bz2
Merge "Expose to the platform the ability to pick up changes in child visibility."
-rw-r--r--core/java/android/view/ViewGroup.java2
-rw-r--r--core/java/android/widget/GridLayout.java12
2 files changed, 13 insertions, 1 deletions
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index 5624eb4..54fee3c 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -843,7 +843,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
* @param child
* @param visibility
*/
- void onChildVisibilityChanged(View child, int visibility) {
+ protected void onChildVisibilityChanged(View child, int visibility) {
if (mTransition != null) {
if (visibility == VISIBLE) {
mTransition.showChild(this, child);
diff --git a/core/java/android/widget/GridLayout.java b/core/java/android/widget/GridLayout.java
index 46fe407..5747fd3 100644
--- a/core/java/android/widget/GridLayout.java
+++ b/core/java/android/widget/GridLayout.java
@@ -775,6 +775,18 @@ public class GridLayout extends ViewGroup {
invalidateStructure();
}
+ /**
+ * We need to call invalidateStructure() when a child's GONE flag changes state.
+ * This implementation is a catch-all, invalidating on any change in the visibility flags.
+ *
+ * @hide
+ */
+ @Override
+ protected void onChildVisibilityChanged(View child, int visibility) {
+ super.onChildVisibilityChanged(child, visibility);
+ invalidateStructure();
+ }
+
// Measurement
private boolean isGone(View c) {