From b165296a9c6e998541ea18c72ffb2de7ba03d596 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Fri, 14 Nov 2014 17:05:06 -0800 Subject: [PATCH] Update clipToPadding docs Clarify that it doesn't clip anything but children, and only if padding is non-zero. Change-Id: I3e3ae31f52fc22304eb13d88765f9f4fc6e43e66 --- core/java/android/view/ViewGroup.java | 13 ++++++++++--- core/res/res/values/attrs.xml | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 654a8edea2fe9..209bce31c32d4 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -3528,8 +3528,11 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } /** - * By default, children are clipped to the padding of the ViewGroup. This - * allows view groups to override this behavior + * Sets whether this ViewGroup will clip its children to its padding, if + * padding is present. + *

+ * By default, children are clipped to the padding of their parent + * Viewgroup. This clipping behavior is only enabled if padding is non-zero. * * @param clipToPadding true to clip children to the padding of the * group, false otherwise @@ -3543,7 +3546,11 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } /** - * Check if this ViewGroup is configured to clip child views to its padding. + * Returns whether this ViewGroup will clip its children to its padding, if + * padding is present. + *

+ * By default, children are clipped to the padding of their parent + * Viewgroup. This clipping behavior is only enabled if padding is non-zero. * * @return true if this ViewGroup clips children to its padding, false otherwise * diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index e63fc55e01d85..43bf5944c94ef 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -2637,8 +2637,8 @@ to allow the children to draw outside of their bounds. The default value of this property is true. --> - +