Skip to content

Commit b25825a

Browse files
author
Steve Block
committed
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
1 parent 75e7b00 commit b25825a

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
@@ -24036,8 +24036,9 @@ package android.widget {
2403624036
ctor public FrameLayout(android.content.Context);
2403724037
ctor public FrameLayout(android.content.Context, android.util.AttributeSet);
2403824038
ctor public FrameLayout(android.content.Context, android.util.AttributeSet, int);
24039-
method public boolean getConsiderGoneChildrenWhenMeasuring();
24039+
method public deprecated boolean getConsiderGoneChildrenWhenMeasuring();
2404024040
method public android.graphics.drawable.Drawable getForeground();
24041+
method public boolean getMeasureAllChildren();
2404124042
method protected void onLayout(boolean, int, int, int, int);
2404224043
method public void setForeground(android.graphics.drawable.Drawable);
2404324044
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
@@ -457,23 +457,42 @@ public boolean gatherTransparentRegion(Region region) {
457457
}
458458

459459
/**
460-
* Determines whether to measure all children or just those in
461-
* the VISIBLE or INVISIBLE state when measuring. Defaults to false.
460+
* Sets whether to consider all children, or just those in
461+
* the VISIBLE or INVISIBLE state, when measuring. Defaults to false.
462+
*
462463
* @param measureAll true to consider children marked GONE, false otherwise.
463464
* Default value is false.
464-
*
465+
*
465466
* @attr ref android.R.styleable#FrameLayout_measureAllChildren
466467
*/
467468
@android.view.RemotableViewMethod
468469
public void setMeasureAllChildren(boolean measureAll) {
469470
mMeasureAllChildren = measureAll;
470471
}
471-
472+
472473
/**
473-
* Determines whether to measure all children or just those in
474-
* the VISIBLE or INVISIBLE state when measuring.
474+
* Determines whether all children, or just those in the VISIBLE or
475+
* INVISIBLE state, are considered when measuring.
476+
*
477+
* @return Whether all children are considered when measuring.
478+
*
479+
* @deprecated This method is deprecated in favor of
480+
* {@link #getMeasureAllChildren() getMeasureAllChildren()}, which was
481+
* renamed for consistency with
482+
* {@link #setMeasureAllChildren(boolean) setMeasureAllChildren()}.
475483
*/
484+
@Deprecated
476485
public boolean getConsiderGoneChildrenWhenMeasuring() {
486+
return getMeasureAllChildren();
487+
}
488+
489+
/**
490+
* Determines whether all children, or just those in the VISIBLE or
491+
* INVISIBLE state, are considered when measuring.
492+
*
493+
* @return Whether all children are considered when measuring.
494+
*/
495+
public boolean getMeasureAllChildren() {
477496
return mMeasureAllChildren;
478497
}
479498

0 commit comments

Comments
 (0)