OSDN Git Service

Update doc to include how clipToPadding affects EdgeEffect
authorDoris Liu <tianliu@google.com>
Fri, 29 May 2015 00:26:46 +0000 (17:26 -0700)
committerDoris Liu <tianliu@google.com>
Fri, 29 May 2015 18:20:46 +0000 (11:20 -0700)
Bug: 19126514
Change-Id: I72c6ac20b4c72421137d97f77da5425e74f2b09a

core/java/android/view/ViewGroup.java
core/res/res/values/attrs.xml

index a7e739d..59f6d9d 100644 (file)
@@ -3602,14 +3602,14 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
     }
 
     /**
-     * Sets whether this ViewGroup will clip its children to its padding, if
-     * padding is present.
+     * Sets whether this ViewGroup will clip its children to its padding and resize (but not
+     * clip) any EdgeEffect to the padded region, if padding is present.
      * <p>
      * By default, children are clipped to the padding of their parent
-     * Viewgroup. This clipping behavior is only enabled if padding is non-zero.
+     * 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
+     * @param clipToPadding true to clip children to the padding of the group, and resize (but
+     *        not clip) any EdgeEffect to the padded region. False otherwise.
      * @attr ref android.R.styleable#ViewGroup_clipToPadding
      */
     public void setClipToPadding(boolean clipToPadding) {
@@ -3620,13 +3620,14 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
     }
 
     /**
-     * Returns whether this ViewGroup will clip its children to its padding, if
-     * padding is present.
+     * Returns whether this ViewGroup will clip its children to its padding, and resize (but
+     * not clip) any EdgeEffect to the padded region, if padding is present.
      * <p>
      * 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
+     * @return true if this ViewGroup clips children to its padding and resizes (but doesn't
+     *         clip) any EdgeEffect to the padded region, false otherwise.
      *
      * @attr ref android.R.styleable#ViewGroup_clipToPadding
      */
index 46e1e5e..039c5e0 100644 (file)
              to allow the children to draw outside of their bounds. The default value of
              this property is true. -->
         <attr name="clipChildren" format="boolean" />
-        <!-- Defines whether the ViewGroup will clip its children to its padding, if
-             padding is not zero. This property is set to true by default. -->
+        <!-- Defines whether the ViewGroup will clip its children and resize (but not clip) any
+             EdgeEffect to its padding, if padding is not zero. This property is set to true by
+             default. -->
         <attr name="clipToPadding" format="boolean" />
         <!-- Defines the layout animation to use the first time the ViewGroup is laid out.
              Layout animations can also be started manually after the first layout. -->