Lines Matching refs:child

110             final View child = getChildAt(i);
111 setInsets(child, insets, mInsets);
118 public void addView(View child, int index, android.view.ViewGroup.LayoutParams params) {
119 super.addView(child, index, params);
120 setInsets(child, mInsets, new Rect());
123 private void setInsets(View child, Rect newInsets, Rect oldInsets) {
124 final FrameLayout.LayoutParams flp = (FrameLayout.LayoutParams) child.getLayoutParams();
125 if (child instanceof Insettable) {
126 ((Insettable) child).setInsets(newInsets);
133 child.setLayoutParams(flp);
157 for (AppWidgetResizeFrame child: mResizeFrames) {
158 child.getHitRect(hitRect);
160 if (child.beginResizeIfPointInRegion(x - child.getLeft(), y - child.getTop())) {
161 mCurrentResizeFrame = child;
261 public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
264 if (child == currentFolder) {
265 return super.onRequestSendAccessibilityEvent(child, event);
271 return super.onRequestSendAccessibilityEvent(child, event);
278 // Only add the folder as a child for accessibility when it is open
346 public float getLocationInDragLayer(View child, int[] loc) {
349 return getDescendantCoordRelativeToSelf(child, loc);
363 * sometimes this is relevant as in a child's coordinates within the root descendant.
449 View child = getChildAt(i);
450 final FrameLayout.LayoutParams flp = (FrameLayout.LayoutParams) child.getLayoutParams();
454 child.layout(lp.x, lp.y, lp.x + lp.width, lp.y + lp.height);
492 public void animateViewIntoPosition(DragView dragView, final View child) {
493 animateViewIntoPosition(dragView, child, null, null);
508 public void animateViewIntoPosition(DragView dragView, final View child,
510 animateViewIntoPosition(dragView, child, -1, onFinishAnimationRunnable, anchorView);
513 public void animateViewIntoPosition(DragView dragView, final View child, int duration,
515 ShortcutAndWidgetContainer parentChildren = (ShortcutAndWidgetContainer) child.getParent();
516 CellLayout.LayoutParams lp = (CellLayout.LayoutParams) child.getLayoutParams();
517 parentChildren.measureChild(child);
523 float childScale = child.getScaleX();
524 coord[0] = lp.x + (int) (child.getMeasuredWidth() * (1 - childScale) / 2);
525 coord[1] = lp.y + (int) (child.getMeasuredHeight() * (1 - childScale) / 2);
527 // Since the child hasn't necessarily been laid out, we force the lp to be updated with
529 float scale = getDescendantCoordRelativeToSelf((View) child.getParent(), coord);
530 // We need to account for the scale of the child itself, as the above only accounts for
536 if (child instanceof TextView) {
537 TextView tv = (TextView) child;
542 // The child may be scaled (always about the center of the view) so to account for it,
544 // the drag view about the scaled child view.
547 toX -= (dragView.getMeasuredWidth() - Math.round(scale * child.getMeasuredWidth())) / 2;
548 } else if (child instanceof FolderIcon) {
550 toY += Math.round(scale * (child.getPaddingTop() - dragView.getDragRegionTop()));
554 toX -= (dragView.getMeasuredWidth() - Math.round(scale * child.getMeasuredWidth())) / 2;
556 toY -= (Math.round(scale * (dragView.getHeight() - child.getMeasuredHeight()))) / 2;
558 - child.getMeasuredWidth()))) / 2;
563 child.setVisibility(INVISIBLE);
566 child.setVisibility(VISIBLE);
591 * doesn't need to be a child of DragLayer.
764 public void onChildViewAdded(View parent, View child) {
769 public void onChildViewRemoved(View parent, View child) {