Lines Matching refs:child

204             View child;
209 child = getChildAt(0);
210 delta = child.getTop() - mListPadding.top;
222 child = getChildAt(childCount - 1);
223 delta = child.getBottom() - (getHeight() - mListPadding.bottom);
515 final View child = infos.get(i).view;
516 final LayoutParams p = (LayoutParams) child.getLayoutParams();
548 public boolean requestChildRectangleOnScreen(View child, Rect rect, boolean immediate) {
553 rect.offset(child.getLeft(), child.getTop());
554 rect.offset(-child.getScrollX(), -child.getScrollY());
619 positionSelector(INVALID_POSITION, child);
620 mSelectedTop = child.getTop();
675 View child = makeAndAddView(pos, nextTop, true, mListPadding.left, selected);
677 nextTop = child.getBottom() + mDividerHeight;
679 selectedView = child;
709 View child = makeAndAddView(pos, nextBottom, false, mListPadding.left, selected);
710 nextBottom = child.getTop() - mDividerHeight;
712 selectedView = child;
1131 final View child = obtainView(0, mIsScrap);
1133 measureScrapChild(child, 0, widthMeasureSpec);
1135 childWidth = child.getMeasuredWidth();
1136 childHeight = child.getMeasuredHeight();
1137 childState = combineMeasuredStates(childState, child.getMeasuredState());
1140 ((LayoutParams) child.getLayoutParams()).viewType)) {
1141 mRecycler.addScrapView(child, -1);
1166 private void measureScrapChild(View child, int position, int widthMeasureSpec) {
1167 LayoutParams p = (LayoutParams) child.getLayoutParams();
1170 child.setLayoutParams(p);
1184 child.measure(childWidthSpec, childHeightSpec);
1203 * @param widthMeasureSpec The width measure spec to be given to a child's
1205 * @param startPosition The position of the first child to be shown.
1206 * @param endPosition The (inclusive) position of the last child to be
1207 * shown. Specify {@link #NO_POSITION} if the last child should be
1208 * the last available child from the adapter.
1238 View child;
1247 child = obtainView(i, isScrap);
1249 measureScrapChild(child, i, widthMeasureSpec);
1252 // Count the divider for all but one child
1258 ((LayoutParams) child.getLayoutParams()).viewType)) {
1259 recycleBin.addScrapView(child, -1);
1262 returnedHeight += child.getMeasuredHeight();
1270 && (returnedHeight != maxHeight) // i'th child did not fit completely
1371 // Get the last child ...
1419 // Get the first child ...
1521 // Remember the previous first child
1554 // Remember which child, if any, had accessibility focus. This must
1599 // call to clear focus when removing the focused child below
1704 View child = getChildAt(mMotionPosition - mFirstPosition);
1705 if (child != null) positionSelector(mMotionPosition, child);
1772 * @return the direct child that contains accessibility focus.
1787 * @param child a direct child of this list.
1788 * @return Whether child is a header or footer view.
1790 private boolean isDirectChildHeaderOrFooter(View child) {
1795 if (child == headers.get(i).view) {
1802 if (child == footers.get(i).view) {
1824 View child;
1829 child = mRecycler.getActiveView(position);
1830 if (child != null) {
1831 // Found it -- we're using an existing child
1833 setupChild(child, position, y, flow, childrenLeft, selected, true);
1835 return child;
1840 child = obtainView(position, mIsScrap);
1843 setupChild(child, position, y, flow, childrenLeft, selected, mIsScrap[0]);
1845 return child;
1849 * Add a view as a child and make sure it is measured (if necessary) and
1852 * @param child The view to add
1853 * @param position The position of this child
1862 private void setupChild(View child, int position, int y, boolean flowDown, int childrenLeft,
1865 final boolean updateChildSelected = isSelected != child.isSelected();
1869 final boolean updateChildPressed = isPressed != child.isPressed();
1870 final boolean needToMeasure = !recycled || updateChildSelected || child.isLayoutRequested();
1874 AbsListView.LayoutParams p = (AbsListView.LayoutParams) child.getLayoutParams();
1882 attachViewToParent(child, flowDown ? -1 : 0, p);
1888 addViewInLayout(child, flowDown ? -1 : 0, p, true);
1892 child.setSelected(isSelected);
1896 child.setPressed(isPressed);
1900 if (child instanceof Checkable) {
1901 ((Checkable) child).setChecked(mCheckStates.get(position));
1904 child.setActivated(mCheckStates.get(position));
1918 child.measure(childWidthSpec, childHeightSpec);
1920 cleanupLayoutState(child);
1923 final int w = child.getMeasuredWidth();
1924 final int h = child.getMeasuredHeight();
1930 child.layout(childrenLeft, childTop, childRight, childBottom);
1932 child.offsetLeftAndRight(childrenLeft - child.getLeft());
1933 child.offsetTopAndBottom(childTop - child.getTop());
1936 if (mCachingStarted && !child.isDrawingCacheEnabled()) {
1937 child.setDrawingCacheEnabled(true);
1940 if (recycled && (((AbsListView.LayoutParams)child.getLayoutParams()).scrappedFromPosition)
1942 child.jumpDrawablesToCurrentState();
2102 // ... and our focused child didn't handle it
2597 * Re-measure a child, and if its height changes, lay it out preserving its
2599 * @param child The child
2600 * @param childIndex The view group index of the child.
2603 private void measureAndAdjustDown(View child, int childIndex, int numChildren) {
2604 int oldHeight = child.getHeight();
2605 measureItem(child);
2606 if (child.getMeasuredHeight() != oldHeight) {
2608 relayoutMeasuredItem(child);
2611 final int heightDelta = child.getMeasuredHeight() - oldHeight;
2619 * Measure a particular list child.
2621 * @param child The child.
2623 private void measureItem(View child) {
2624 ViewGroup.LayoutParams p = child.getLayoutParams();
2640 child.measure(childWidthSpec, childHeightSpec);
2644 * Layout a child that has been measured, preserving its top position.
2646 * @param child The child.
2648 private void relayoutMeasuredItem(View child) {
2649 final int w = child.getMeasuredWidth();
2650 final int h = child.getMeasuredHeight();
2653 final int childTop = child.getTop();
2655 child.layout(childLeft, childTop, childRight, childBottom);
2916 final View child = getChildAt(i);
2917 if (isViewAncestorOf(newFocus, child)) {
2921 throw new IllegalArgumentException("newFocus is not a child of any of the"
2926 * Return true if child is an ancestor of parent, (or equal to the parent).
2928 private boolean isViewAncestorOf(View child, View parent) {
2929 if (child == parent) {
2933 final ViewParent theParent = child.getParent();
3019 // may have brought in the last child of the list that is skinnier
3047 // may have brought the very first child of the list in too far and
3244 View child = getChildAt(i);
3245 bottom = child.getBottom();
3287 View child = getChildAt(i);
3288 top = child.getTop();
3296 // Give the method the child ABOVE the divider, so we
3297 // subtract one from our child
3298 // position. Give -1 when there is no child above the
3330 protected boolean drawChild(Canvas canvas, View child, long drawingTime) {
3331 boolean more = super.drawChild(canvas, child, drawingTime);
3332 if (mCachingActive && child.mCachingFailed) {
3339 * Draws a divider for the given child in the given bounds.
3343 * @param childIndex The index of child (of the View) above the divider.
3344 * This will be -1 if there is no child above the divider to be