Code example for Layout

Methods: getLineTopscrollTo

0
     * @hide 
     */ 
    protected boolean scrollTop(TextView widget, Spannable buffer) {
        final Layout layout = widget.getLayout();
        if (getTopLine(widget) >= 0) {
            Touch.scrollTo(widget, layout, widget.getScrollX(), layout.getLineTop(0));
            return true; 
        } 
        return false; 
    } 
 
    /** 
     * Performs a scroll to bottom action. 
     * Scrolls to the bottom of the document. 
     * 
     * @param widget The text view. 
     * @param buffer The text buffer. 
     * @return True if the event was handled. 
     * @hide 
     */ 
    protected boolean scrollBottom(TextView widget, Spannable buffer) {