scrollTo和fullScroll两个方法经常被用来做滚动到底部的操作
不过就这个功能而言 也是有不同之处的
使用fullScroll滚动到底部 使用的参数为 FOCUS_DOWN 顾名思义 和 焦点有关
fullScroll 代码如下
/**
* <p>Handles scrolling in response to a "home/end" shortcut press. This
* method will scroll the view to the top or bottom and give the focus
* to the topmost/bottommost component in the new visible area. If no
* component is a good candidate for focus, this scrollview reclaims the
* focus.</p>
*
* @param direction the scroll direction: {@link android.view.View#FOCUS_UP}
* to go the top of the view or
* {@link android.view.View#FOCUS_DOWN} to go the bottom
* @return true if the key event is consumed by this method, false otherwise
*/
public