From b25825a1b159a469f80423800daa7f5b6250acce Mon Sep 17 00:00:00 2001 From: Steve Block Date: Wed, 27 Apr 2011 14:51:38 +0100 Subject: [PATCH] Add FrameLayout.getMeasureAllChildren() Currently the counterpart to FrameLayout.setMeasureAllChildren() is FameLayout.getConsiderGoneChildrenWhenMeasuring(). This change deprecates FameLayout.getConsiderGoneChildrenWhenMeasuring() in favor of a new FrameLayout.getMeasureAllChildren() method. Change-Id: Id26ec8b3966bd1553d5fd708ad76049069fcaeef --- api/current.txt | 3 ++- core/java/android/widget/FrameLayout.java | 31 ++++++++++++++++++----- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/api/current.txt b/api/current.txt index 4b3918e6adba1..1f97187e42cd9 100644 --- a/api/current.txt +++ b/api/current.txt @@ -24036,8 +24036,9 @@ package android.widget { ctor public FrameLayout(android.content.Context); ctor public FrameLayout(android.content.Context, android.util.AttributeSet); ctor public FrameLayout(android.content.Context, android.util.AttributeSet, int); - method public boolean getConsiderGoneChildrenWhenMeasuring(); + method public deprecated boolean getConsiderGoneChildrenWhenMeasuring(); method public android.graphics.drawable.Drawable getForeground(); + method public boolean getMeasureAllChildren(); method protected void onLayout(boolean, int, int, int, int); method public void setForeground(android.graphics.drawable.Drawable); method public void setForegroundGravity(int); diff --git a/core/java/android/widget/FrameLayout.java b/core/java/android/widget/FrameLayout.java index 590a76820bc37..1896b43f4d13f 100644 --- a/core/java/android/widget/FrameLayout.java +++ b/core/java/android/widget/FrameLayout.java @@ -457,23 +457,42 @@ public class FrameLayout extends ViewGroup { } /** - * Determines whether to measure all children or just those in - * the VISIBLE or INVISIBLE state when measuring. Defaults to false. + * Sets whether to consider all children, or just those in + * the VISIBLE or INVISIBLE state, when measuring. Defaults to false. + * * @param measureAll true to consider children marked GONE, false otherwise. * Default value is false. - * + * * @attr ref android.R.styleable#FrameLayout_measureAllChildren */ @android.view.RemotableViewMethod public void setMeasureAllChildren(boolean measureAll) { mMeasureAllChildren = measureAll; } - + /** - * Determines whether to measure all children or just those in - * the VISIBLE or INVISIBLE state when measuring. + * Determines whether all children, or just those in the VISIBLE or + * INVISIBLE state, are considered when measuring. + * + * @return Whether all children are considered when measuring. + * + * @deprecated This method is deprecated in favor of + * {@link #getMeasureAllChildren() getMeasureAllChildren()}, which was + * renamed for consistency with + * {@link #setMeasureAllChildren(boolean) setMeasureAllChildren()}. */ + @Deprecated public boolean getConsiderGoneChildrenWhenMeasuring() { + return getMeasureAllChildren(); + } + + /** + * Determines whether all children, or just those in the VISIBLE or + * INVISIBLE state, are considered when measuring. + * + * @return Whether all children are considered when measuring. + */ + public boolean getMeasureAllChildren() { return mMeasureAllChildren; }