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
我在ConsecutiveViewPager的源码中看到了getCurrentScrollerView是
@Override public View getCurrentScrollerView() { int count = getChildCount(); for (int i = 0; i < count; i++) { View view = getChildAt(i); if (view.getX() == getScrollX() + getPaddingLeft()) { return view; } } return this; }
这个地方我觉得很奇怪,为什么使用view.getX() == getScrollX() + getPaddingLeft()而不是以下的方式获取当前展示的View?
@Override public View getCurrentScrollerView() { return getChildAt(getCurrentItem()); }
The text was updated successfully, but these errors were encountered:
因为child的顺序是不确定的,item0对于的child view可能是getChildAt(0),也可能是getChildAt(1)或者其他
Sorry, something went wrong.
No branches or pull requests
我在ConsecutiveViewPager的源码中看到了getCurrentScrollerView是
这个地方我觉得很奇怪,为什么使用view.getX() == getScrollX() + getPaddingLeft()而不是以下的方式获取当前展示的View?
The text was updated successfully, but these errors were encountered: