diff --git a/api/current.txt b/api/current.txt index 78c3917e6ca02..e1cc501c0df93 100644 --- a/api/current.txt +++ b/api/current.txt @@ -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(); diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index edc9971863586..ac70066a28511 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -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} */