Skip to content

Commit 703bde8

Browse files
Steve BlockAndroid (Google) Code Review
authored andcommitted
Merge "Add FrameLayout.getMeasureAllChildren()"
2 parents 2d719af + b25825a commit 703bde8

File tree

2 files changed

+27
-7
lines changed

2 files changed

+27
-7
lines changed

api/current.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25917,8 +25917,9 @@ package android.widget {
2591725917
ctor public FrameLayout(android.content.Context);
2591825918
ctor public FrameLayout(android.content.Context, android.util.AttributeSet);
2591925919
ctor public FrameLayout(android.content.Context, android.util.AttributeSet, int);
25920-
method public boolean getConsiderGoneChildrenWhenMeasuring();
25920+
method public deprecated boolean getConsiderGoneChildrenWhenMeasuring();
2592125921
method public android.graphics.drawable.Drawable getForeground();
25922+
method public boolean getMeasureAllChildren();
2592225923
method protected void onLayout(boolean, int, int, int, int);
2592325924
method public void setForeground(android.graphics.drawable.Drawable);
2592425925
method public void setForegroundGravity(int);

core/java/android/widget/FrameLayout.java

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -465,23 +465,42 @@ public boolean gatherTransparentRegion(Region region) {
465465
}
466466

467467
/**
468-
* Determines whether to measure all children or just those in
469-
* the VISIBLE or INVISIBLE state when measuring. Defaults to false.
468+
* Sets whether to consider all children, or just those in
469+
* the VISIBLE or INVISIBLE state, when measuring. Defaults to false.
470+
*
470471
* @param measureAll true to consider children marked GONE, false otherwise.
471472
* Default value is false.
472-
*
473+
*
473474
* @attr ref android.R.styleable#FrameLayout_measureAllChildren
474475
*/
475476
@android.view.RemotableViewMethod
476477
public void setMeasureAllChildren(boolean measureAll) {
477478
mMeasureAllChildren = measureAll;
478479
}
479-
480+
480481
/**
481-
* Determines whether to measure all children or just those in
482-
* the VISIBLE or INVISIBLE state when measuring.
482+
* Determines whether all children, or just those in the VISIBLE or
483+
* INVISIBLE state, are considered when measuring.
484+
*
485+
* @return Whether all children are considered when measuring.
486+
*
487+
* @deprecated This method is deprecated in favor of
488+
* {@link #getMeasureAllChildren() getMeasureAllChildren()}, which was
489+
* renamed for consistency with
490+
* {@link #setMeasureAllChildren(boolean) setMeasureAllChildren()}.
483491
*/
492+
@Deprecated
484493
public boolean getConsiderGoneChildrenWhenMeasuring() {
494+
return getMeasureAllChildren();
495+
}
496+
497+
/**
498+
* Determines whether all children, or just those in the VISIBLE or
499+
* INVISIBLE state, are considered when measuring.
500+
*
501+
* @return Whether all children are considered when measuring.
502+
*/
503+
public boolean getMeasureAllChildren() {
485504
return mMeasureAllChildren;
486505
}
487506

0 commit comments

Comments
 (0)