private View findFocusableViewInMyBounds(final boolean topFocus,final int top,final boolean leftFocus,final int left,View preferredFocusable){
  final int verticalFadingEdgeLength=getVerticalFadingEdgeLength() / 2;
  final int topWithoutFadingEdge=top + verticalFadingEdgeLength;
  final int bottomWithoutFadingEdge=top + getHeight() - verticalFadingEdgeLength;
  final int horizontalFadingEdgeLength=getHorizontalFadingEdgeLength() / 2;
  final int leftWithoutFadingEdge=left + horizontalFadingEdgeLength;
  final int rightWithoutFadingEdge=left + getWidth() - horizontalFadingEdgeLength;
  if ((preferredFocusable != null) && (preferredFocusable.getTop() < bottomWithoutFadingEdge) && (preferredFocusable.getBottom() > topWithoutFadingEdge)&& (preferredFocusable.getLeft() < rightWithoutFadingEdge)&& (preferredFocusable.getRight() > leftWithoutFadingEdge)) {
    return preferredFocusable;
  }
  return findFocusableViewInBounds(topFocus,topWithoutFadingEdge,bottomWithoutFadingEdge,leftFocus,leftWithoutFadingEdge,rightWithoutFadingEdge);
}

private View findFocusableViewInMyBounds ( final boolean topFocus , final int top , final boolean leftFocus , final int left , View preferredFocusable ) { final int verticalFadingEdgeLength = getVerticalFadingEdgeLength ( ) / 2 ; final int topWithoutFadingEdge = top + verticalFadingEdgeLength ; final int bottomWithoutFadingEdge = top + getHeight ( ) - verticalFadingEdgeLength ; final int horizontalFadingEdgeLength = getHorizontalFadingEdgeLength ( ) / 2 ; final int leftWithoutFadingEdge = left + horizontalFadingEdgeLength ; final int rightWithoutFadingEdge = left + getWidth ( ) - horizontalFadingEdgeLength ; if ( ( preferredFocusable != null ) && ( preferredFocusable . getTop ( ) < bottomWithoutFadingEdge ) && ( preferredFocusable . getBottom ( ) > topWithoutFadingEdge ) && ( preferredFocusable . getLeft ( ) < rightWithoutFadingEdge ) && ( preferredFocusable . getRight ( ) > leftWithoutFadingEdge ) ) { return preferredFocusable ; } return findFocusableViewInBounds ( topFocus , topWithoutFadingEdge , bottomWithoutFadingEdge , leftFocus , leftWithoutFadingEdge , rightWithoutFadingEdge ) ; }
finds the next focusable component that fits in this view ' s bounds ( excluding fading edges ) pretending that this view ' s top is located at the parameter top .
