I created a class that extends ListView
so that I can override onScrollChanged
so that I can tell is the list has been scrolled up or down. However everytime it gets called, all the values are 0.
Doing this for a regular ScrollView
returns me the values I am looking for so does this not work the same as ScrollView?
here is my wrapper class
public class ImageScrollView extends ListView {
OnScrollChangedListener listener;
public interface OnScrollChangedListener{
public void onScrollChangedListener(int l, int t, int oldl, int oldt);
}
public ImageScrollView(Context context) {
super(context);
}
public ImageScrollView(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public void onScrollChanged(int l, int t, int oldl, int oldt){
if(listener != null){
listener.onScrollChangedListener(l,t,oldl,oldt);
}
}
}