Android: InteractiveScrollView

(June 4th, 2010)

This post is a simple follow up to Android: Understanding when ScrollView has reached the bottom where I have created a small plug and play widget which notifies when scroll bottom has been reached through a listener.

It works like this: InteractiveScrollView inherits from ScrollView and overrides onScrollChanged to validate scroll position. If bottom has been reached, onBottomReachedListener triggers.

Usage:

InteractiveScrollView scrollView;    

scrollView = (InteractiveScrollView) findViewById( R.id.scrollView);
scrollView.setOnBottomReachedListener(new InteractiveScrollView.OnBottomReachedListener() {
                @Override
                public void onBottomReached()
                {
                        // bottom reached
                }
});

View the class or download it here.

Leave a Reply