public boolean scrollView ( final View view , int direction ) { if ( view == null ) { return false ; } int height = view . getHeight ( ) ; height -- ; int scrollTo = - 1 ; if ( direction == DOWN ) { scrollTo = height ; } else if ( direction == UP ) { scrollTo = - height ; } int originalY = view . getScrollY ( ) ; final int scrollAmount = scrollTo ; inst . runOnMainSync ( new Runnable ( ) { public void run ( ) { view . scrollBy ( 0 , scrollAmount ) ; } } ) ; if ( originalY == view . getScrollY ( ) ) { return false ; } else { return true ; } }
Scrolls a ScrollView .