Skip to content

Instantly share code, notes, and snippets.

@biodunalfet
Created June 7, 2016 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save biodunalfet/63a70e4fcfe63a9c5885d555d18188b0 to your computer and use it in GitHub Desktop.
Save biodunalfet/63a70e4fcfe63a9c5885d555d18188b0 to your computer and use it in GitHub Desktop.
int lastVisibleItemPosition = ((LinearLayoutManager)recyclerAdapter.recyclerView.
getLayoutManager()).findLastCompletelyVisibleItemPosition();
if ((id + 1) < general.size()) {
if ((id + 1) > lastVisibleItemPosition) {
recyclerAdapter.recyclerView.scrollToPosition(id + 1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment