android ListView滑动到顶部带弹性效果

重写overScrollBy,改变maxOverScrollY值即可

@Override
    protected boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX, int scrollRangeY, int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) {
        return super.overScrollBy(deltaX, deltaY, scrollX, scrollY, scrollRangeX, scrollRangeY, maxOverScrollX, maxOverScrollY+250, isTouchEvent);
    }


你可能感兴趣的:(android)