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
I implement onScrollStateChanged method in RecyclerView and it works great, i want to show scroller when recycler dragged and i succesfully do it. But when i try to scroll by fastscroller recycler wont notify onScrollStateListener and nothing happened.
It works only when i drag recycler without scroller, how can i make it work with fastscroller too?
RecyclerViewScrollListener onScrollListener = new RecyclerViewScrollListener(mFastScroller) {
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
switch (newState) {
case RecyclerView.SCROLL_STATE_DRAGGING :
Animation fadeInAnimation = AnimationUtils
.loadAnimation(IMContactsListFragment.this.getContext(), R.anim.fade_in);
mFastScroller.startAnimation(fadeInAnimation);
mFastScroller.setVisibility(View.VISIBLE);
break;
case RecyclerView.SCROLL_STATE_IDLE :
Animation fadeOutAnimation = AnimationUtils
.loadAnimation(IMContactsListFragment.this.getContext(), R.anim.fade_out);
mFastScroller.startAnimation(fadeOutAnimation);
mFastScroller.setVisibility(View.GONE);
break;
}
}
};
The text was updated successfully, but these errors were encountered:
I implement onScrollStateChanged method in RecyclerView and it works great, i want to show scroller when recycler dragged and i succesfully do it. But when i try to scroll by fastscroller recycler wont notify onScrollStateListener and nothing happened.
It works only when i drag recycler without scroller, how can i make it work with fastscroller too?
The text was updated successfully, but these errors were encountered: