@@ -63,16 +63,16 @@ public interface ViewParent {
6363 /**
6464 * All or part of a child is dirty and needs to be redrawn.
6565 *
66- * The location array is an array of two int values which respectively
67- * define the left and the top position of the dirty child.
66+ * <p> The location array is an array of two int values which respectively
67+ * define the left and the top position of the dirty child.</p>
6868 *
69- * This method must return the parent of this ViewParent if the specified
69+ * <p> This method must return the parent of this ViewParent if the specified
7070 * rectangle must be invalidated in the parent. If the specified rectangle
7171 * does not require invalidation in the parent or if the parent does not
72- * exist, this method must return null.
72+ * exist, this method must return null.</p>
7373 *
74- * When this method returns a non-null value, the location array must
75- * have been updated with the left and top coordinates of this ViewParent.
74+ * <p> When this method returns a non-null value, the location array must
75+ * have been updated with the left and top coordinates of this ViewParent.</p>
7676 *
7777 * @param location An array of 2 ints containing the left and top
7878 * coordinates of the child to invalidate
@@ -115,6 +115,26 @@ public interface ViewParent {
115115 */
116116 public void clearChildFocus (View child );
117117
118+ /**
119+ * Compute the visible part of a rectangular region defined in terms of a child view's
120+ * coordinates.
121+ *
122+ * <p>Returns the clipped visible part of the rectangle <code>r</code>, defined in the
123+ * <code>child</code>'s local coordinate system. <code>r</code> is modified by this method to
124+ * contain the result, expressed in the global (root) coordinate system.</p>
125+ *
126+ * <p>The resulting rectangle is always axis aligned. If a rotation is applied to a node in the
127+ * View hierarchy, the result is the axis-aligned bounding box of the visible rectangle.</p>
128+ *
129+ * @param child A child View, whose rectangular visible region we want to compute
130+ * @param r The input rectangle, defined in the child coordinate system. Will be overwritten to
131+ * contain the resulting visible rectangle, expressed in global (root) coordinates
132+ * @param offset The input coordinates of a point, defined in the child coordinate system.
133+ * As with the <code>r</code> parameter, this will be overwritten to contain the global (root)
134+ * coordinates of that point.
135+ * A <code>null</code> value is valid (in case you are not interested in this result)
136+ * @return true if the resulting rectangle is not empty, false otherwise
137+ */
118138 public boolean getChildVisibleRect (View child , Rect r , android .graphics .Point offset );
119139
120140 /**
@@ -143,11 +163,11 @@ public interface ViewParent {
143163
144164 /**
145165 * Bring up a context menu for the specified view or its ancestors.
146- * <p>
147- * In most cases, a subclass does not need to override this. However, if
166+ *
167+ * <p> In most cases, a subclass does not need to override this. However, if
148168 * the subclass is added directly to the window manager (for example,
149169 * {@link ViewManager#addView(View, android.view.ViewGroup.LayoutParams)})
150- * then it should override this and show the context menu.
170+ * then it should override this and show the context menu.</p>
151171 *
152172 * @param originalView The source view where the context menu was first invoked
153173 * @return true if a context menu was displayed
@@ -164,11 +184,11 @@ public interface ViewParent {
164184
165185 /**
166186 * Start an action mode for the specified view.
167- * <p>
168- * In most cases, a subclass does not need to override this. However, if the
187+ *
188+ * <p> In most cases, a subclass does not need to override this. However, if the
169189 * subclass is added directly to the window manager (for example,
170190 * {@link ViewManager#addView(View, android.view.ViewGroup.LayoutParams)})
171- * then it should override this and start the action mode.
191+ * then it should override this and start the action mode.</p>
172192 *
173193 * @param originalView The source view where the action mode was first invoked
174194 * @param callback The callback that will handle lifecycle events for the action mode
@@ -188,10 +208,10 @@ public interface ViewParent {
188208 * Called when a child does not want this parent and its ancestors to
189209 * intercept touch events with
190210 * {@link ViewGroup#onInterceptTouchEvent(MotionEvent)}.
191- * <p>
192- * This parent should pass this call onto its parents. This parent must obey
211+ *
212+ * <p> This parent should pass this call onto its parents. This parent must obey
193213 * this request for the duration of the touch (that is, only clear the flag
194- * after this parent has received an up or a cancel.
214+ * after this parent has received an up or a cancel.</p>
195215 *
196216 * @param disallowIntercept True if the child does not want the parent to
197217 * intercept touch events.
@@ -234,7 +254,7 @@ public boolean requestChildRectangleOnScreen(View child, Rect rectangle,
234254 * the sending. The parent can optionally add a record for itself before
235255 * dispatching the request to its parent. A parent can also choose not to
236256 * respect the request for sending the event. The accessibility event is sent
237- * by the topmost view in the view tree.
257+ * by the topmost view in the view tree.</p>
238258 *
239259 * @param child The child which requests sending the event.
240260 * @param event The event to be sent.
0 commit comments