question: private boolean scrollViewCanScrollVertically ( ScrollView scrollView , int direction ) { final int offset = Math . max ( 0 , scrollView . getScrollY ( ) ) ; final int range = computeVerticalScrollRange ( scrollView ) - scrollView . getHeight ( ) ; if ( range == 0 ) return false ; if ( direction < 0 ) { return offset > 0 ; } else { return offset < range - 1 ; } }
target:  Copy From ScrollView (API Level >= 14)