Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScrollStateListener not work with fastscroller #68

Open
ivametal opened this issue Aug 8, 2017 · 0 comments
Open

ScrollStateListener not work with fastscroller #68

ivametal opened this issue Aug 8, 2017 · 0 comments

Comments

@ivametal
Copy link

ivametal commented Aug 8, 2017

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;
                }
            }
        };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant