Last active
June 11, 2017 15:47
-
-
Save sujithkanna/f52432d7a79c73f6f34cfef2d2cae106 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() { | |
@Override | |
public void onScrollStateChanged(RecyclerView recyclerView, int newState) { | |
super.onScrollStateChanged(recyclerView, newState); | |
} | |
@Override | |
public void onScrolled(RecyclerView recyclerView, int dx, int dy) { | |
super.onScrolled(recyclerView, dx, dy); | |
int count = mRecyclerView.getChildCount(); | |
for (int i = 0; i < count; i++) { | |
MenuAdapter.MenuViewHolder holder = (MenuAdapter.MenuViewHolder) | |
mRecyclerView.getChildViewHolder(mRecyclerView.getChildAt(i)); | |
// Pass the viewHolderss to the method we created for slide animation | |
mMenuAdapter.invalidateSlider(holder); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment