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
private boolean isRecyclerViewTop(RecyclerView recyclerView) { if (recyclerView != null) { RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager(); if (layoutManager instanceof LinearLayoutManager) { int firstVisibleItemPosition = ((LinearLayoutManager) layoutManager).findFirstVisibleItemPosition(); View childAt = recyclerView.getChildAt(0); if (childAt == null || (firstVisibleItemPosition == 0 && childAt.getTop() == 0)) { return true; } } } return false; } 这个方法中 置灰的地方 如果rv中加了间距 这里会判断不准确,是否可以提供 设置间距的api 在这里减去对应的值
childAt.getTop()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
private boolean isRecyclerViewTop(RecyclerView recyclerView) {
if (recyclerView != null) {
RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager();
if (layoutManager instanceof LinearLayoutManager) {
int firstVisibleItemPosition = ((LinearLayoutManager) layoutManager).findFirstVisibleItemPosition();
View childAt = recyclerView.getChildAt(0);
if (childAt == null || (firstVisibleItemPosition == 0 &&
childAt.getTop()
== 0)) {return true;
}
}
}
return false;
}
这个方法中 置灰的地方 如果rv中加了间距 这里会判断不准确,是否可以提供 设置间距的api 在这里减去对应的值
The text was updated successfully, but these errors were encountered: