How do I know that the scrollview is already scrolled to the bottom?

Posted by sanna on Stack Overflow See other posts from Stack Overflow or by sanna
Published on 2010-05-19T10:16:31Z Indexed on 2010/05/19 10:20 UTC
Read the original article Hit count: 258

Filed under:
|

I have a scrollview and I only want an event to happen if it's already scrolled to the bottom but I can't find a way to check if the scrollview is at the bottom.

I have solved it for the opposite; only allow the event to happen if it's already scrolled to the top:

ScrollView sv = (ScrollView) findViewById(R.id.Scroll);
    if(sv.getScrollY() == 0) {
        //do something
    }
    else {
        //do nothing
    }

© Stack Overflow or respective owner

Related posts about android

Related posts about scrollview