public class InScrollView extends ScrollView {
public InScrollView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
public InScrollView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public InScrollView(Context context) {
super(context);
}
//禁止scrollView内布局变化自动滚动
@Override
protected int computeScrollDeltaToGetChildRectOnScreen(Rect rect) {
return 0;
}
}