If you think the Android project TechDissected 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
package com.pkmmte.techdissected.view;
//www.java2s.comimport android.content.Context;
import android.util.AttributeSet;
publicclass PkScrollView extends StickyScrollView {
private PkScrollViewListener mScrollListener = null;
privateint extraTop = 0;
public PkScrollView(Context context)
{
super(context);
}
public PkScrollView(Context context, AttributeSet attrs)
{
super(context, attrs);
}
public PkScrollView(Context context, AttributeSet attrs, int defStyle)
{
super(context, attrs, defStyle);
}
publicvoid setExtraTop(int extra) {
this.extraTop = extra;
}
publicvoid setOnScrollListener(PkScrollViewListener scrollListener)
{
this.mScrollListener = scrollListener;
}
@Override
protectedvoid onScrollChanged(int x, int y, int oldx, int oldy)
{
super.onScrollChanged(x, y, oldx, oldy);
if(mScrollListener != null) {
mScrollListener.onScrollChanged(this, x, y, oldx, oldy);
}
}
publicinterface PkScrollViewListener
{
void onScrollChanged(PkScrollView scrollView, int x, int y, int oldx, int oldy);
}
}