Android Open Source - vitdroid-android Observable Scroll View2

From Project

Back to project page vitdroid-android.


The source code is released under:

Apache License

If you think the Android project vitdroid-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

//  w ww . ja v  a 2s. co m
import android.content.Context;
import android.util.AttributeSet;
import android.widget.HorizontalScrollView;
import android.widget.ScrollView;

public class ObservableScrollView2 extends ScrollView {

    private ScrollViewListener2 scrollViewListener = null;

    public ObservableScrollView2(Context context) {

    public ObservableScrollView2(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);

    public ObservableScrollView2(Context context, AttributeSet attrs) {
        super(context, attrs);

    public void setScrollViewListener(ScrollViewListener2 scrollViewListener) {
        this.scrollViewListener = scrollViewListener;

    protected void onScrollChanged(int x, int y, int oldx, int oldy) {
        super.onScrollChanged(x, y, oldx, oldy);
        if(scrollViewListener != null) {
            scrollViewListener.onScrollChanged(this, x, y, oldx, oldy);


Java Source Code List