We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scrollToClose(), 走完了整个代码, scroller.startScroll(0, getScrollY(), 0, dy, duration); 但是控件就是没有滚动起来。 下面是源码中的,有走完最后一句 invalidate(); 使用 setToClosed(), 就没有问题,但是没有滚动效果
public void scrollToClose() { if (currentInnerStatus == InnerStatus.CLOSED) { return; } if (maxOffset == minOffset) { return; } int dy = -getScrollY() - minOffset; if (dy == 0) { return; } currentInnerStatus = InnerStatus.SCROLLING; int duration = MIN_SCROLL_DURATION + Math.abs((MAX_SCROLL_DURATION - MIN_SCROLL_DURATION) * dy / (maxOffset - minOffset)); scroller.startScroll(0, getScrollY(), 0, dy, duration); invalidate(); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
scrollToClose(), 走完了整个代码, scroller.startScroll(0, getScrollY(), 0, dy, duration); 但是控件就是没有滚动起来。
下面是源码中的,有走完最后一句 invalidate();
使用 setToClosed(), 就没有问题,但是没有滚动效果
public void scrollToClose() {
if (currentInnerStatus == InnerStatus.CLOSED) {
return;
}
if (maxOffset == minOffset) {
return;
}
int dy = -getScrollY() - minOffset;
if (dy == 0) {
return;
}
currentInnerStatus = InnerStatus.SCROLLING;
int duration = MIN_SCROLL_DURATION + Math.abs((MAX_SCROLL_DURATION - MIN_SCROLL_DURATION) * dy / (maxOffset - minOffset));
scroller.startScroll(0, getScrollY(), 0, dy, duration);
invalidate();
}
The text was updated successfully, but these errors were encountered: