private boolean isListViewScrolledToBottom ( @ NonNull final AbsListView scrollView ) { if ( scrollView . getCount ( ) > 0 && scrollView . getChildCount ( ) > 0 ) { if ( scrollView . getLastVisiblePosition ( ) == scrollView . getCount ( ) - 1 ) { View child = scrollView . getChildAt ( scrollView . getChildCount ( ) - 1 ) ; return child == null || child . getBottom ( ) <= scrollView . getHeight ( ) ; } } else { return true ; } return false ; }
Returns whether a specific list view is scrolled to the bottom or not .