-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Description
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;
}
}
};
Metadata
Metadata
Assignees
Labels
No labels