Need help in using getScrollY() of ListView

Posted by michael on Stack Overflow See other posts from Stack Overflow or by michael
Published on 2010-04-29T07:24:41Z Indexed on 2010/04/29 7:27 UTC
Read the original article Hit count: 412

Filed under:

Hi,

I have the following code which recording the scroll Y position in my ListView whenever my activity is paused.

protected void onSaveInstanceState (Bundle outState) {
 super.onSaveInstanceState(outState); 
 int scroll = mListView.getScrollY(); 
 System.out.println (" scrollY" + scroll);
} 

But regardless where I scroll my ListView vertically, the value of getScrollY() always return 0. Can anyone please help me?

Thank you.

© Stack Overflow or respective owner

Related posts about android