You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.
When I execute the next code, the image header is not fully loaded.
` final int position = 0;
if (!(mRecyclerView.getLayoutManager() instanceof LinearLayoutManager)) return;
LinearLayoutManager layoutManager = (LinearLayoutManager)
mRecyclerView.getLayoutManager();
final int topItem = layoutManager.findFirstVisibleItemPosition();
final int distance = topItem - position;
int maxScroll = 10;
int anchorItem;
if (distance > maxScroll) anchorItem = position + maxScroll;
else if (distance < -maxScroll) anchorItem = position - maxScroll;
else anchorItem = topItem;
if (anchorItem != topItem) mRecyclerView.scrollToPosition(anchorItem);
When I execute the next code, the image header is not fully loaded.
` final int position = 0;
if (!(mRecyclerView.getLayoutManager() instanceof LinearLayoutManager)) return;
LinearLayoutManager layoutManager = (LinearLayoutManager)
mRecyclerView.getLayoutManager();
final int topItem = layoutManager.findFirstVisibleItemPosition();
final int distance = topItem - position;
int maxScroll = 10;
int anchorItem;
if (distance > maxScroll) anchorItem = position + maxScroll;
else if (distance < -maxScroll) anchorItem = position - maxScroll;
else anchorItem = topItem;
if (anchorItem != topItem) mRecyclerView.scrollToPosition(anchorItem);
The text was updated successfully, but these errors were encountered: