Skip to content

Instantly share code, notes, and snippets.

Jesse van Muijden jessevanmuijden

Block or report user

Report or block jessevanmuijden

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mandhor
mandhor / swipeRefreshLayoutRecyclerView.java
Created Apr 8, 2015
SwipeRefreshLayout RecyclerView bug workaround (SwipeRefreshLayout catches scroll up too early - not on top of the list - making it impossible to scroll up recyclerview)
View swipeRefreshLayoutRecyclerView.java
//we have to keep current scroll value somewhere in our fragment
private int overallYScroll = 0;
recyclerView.setOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
overallYScroll = overallYScroll + dy;
You can’t perform that action at this time.