Add ViewGroup#getClipToPadding()

It's kind of silly that we've gone this long without a good way to
query this since it makes writing custom views that properly handle
EdgeEffects, etc. a real pain.

Change-Id: I08e1cdf9ec7b8ec3c287c22a5aa19d07a166a4e0
This commit is contained in:
Adam Powell
2014-07-11 15:37:15 -07:00
parent 2c1d7b3b9f
commit 1c35b08c93
2 changed files with 12 additions and 0 deletions

View File

@@ -33640,6 +33640,7 @@ package android.view {
method protected boolean getChildStaticTransformation(android.view.View, android.view.animation.Transformation);
method public boolean getChildVisibleRect(android.view.View, android.graphics.Rect, android.graphics.Point);
method public boolean getClipChildren();
method public boolean getClipToPadding();
method public int getDescendantFocusability();
method public android.view.View getFocusedChild();
method public android.view.animation.LayoutAnimationController getLayoutAnimation();

View File

@@ -3332,6 +3332,17 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
}
}
/**
* Check if this ViewGroup is configured to clip child views to its padding.
*
* @return true if this ViewGroup clips children to its padding, false otherwise
*
* @attr ref android.R.styleable#ViewGroup_clipToPadding
*/
public boolean getClipToPadding() {
return hasBooleanFlag(FLAG_CLIP_TO_PADDING);
}
/**
* {@inheritDoc}
*/