protected boolean scrollDown(TextView widget,Spannable buffer,int amount){
  final Layout layout=widget.getLayout();
  final int innerHeight=getInnerHeight(widget);
  final int bottom=widget.getScrollY() + innerHeight;
  int bottomLine=layout.getLineForVertical(bottom);
  if (layout.getLineTop(bottomLine + 1) < bottom + 1) {
    bottomLine+=1;
  }
  final int limit=layout.getLineCount() - 1;
  if (bottomLine <= limit) {
    bottomLine=Math.min(bottomLine + amount - 1,limit);
    Touch.scrollTo(widget,layout,widget.getScrollX(),layout.getLineTop(bottomLine + 1) - innerHeight);
    return true;
  }
  return false;
}

protected boolean scrollDown ( TextView widget , Spannable buffer , int amount ) { final Layout layout = widget . getLayout ( ) ; final int innerHeight = getInnerHeight ( widget ) ; final int bottom = widget . getScrollY ( ) + innerHeight ; int bottomLine = layout . getLineForVertical ( bottom ) ; if ( layout . getLineTop ( bottomLine + 1 ) < bottom + 1 ) { bottomLine += 1 ; } final int limit = layout . getLineCount ( ) - 1 ; if ( bottomLine <= limit ) { bottomLine = Math . min ( bottomLine + amount - 1 , limit ) ; Touch . scrollTo ( widget , layout , widget . getScrollX ( ) , layout . getLineTop ( bottomLine + 1 ) - innerHeight ) ; return true ; } return false ; }
performs a scroll down action . scrolls down by the specified number of lines .
