recycler-fast-scroll icon indicating copy to clipboard operation
recycler-fast-scroll copied to clipboard

Scrollbar Visibility

Open AhmadullahSaikat opened this issue 9 years ago • 3 comments

How to make scrollbar all time visible Now the visibility appears after scrolling

AhmadullahSaikat avatar Dec 06 '16 14:12 AhmadullahSaikat

You will have to use custom view: https://github.com/FutureMind/recycler-fast-scroll#custom-views.

micHar avatar Dec 06 '16 15:12 micHar

Implement the custom view, as suggested, then in CustomScrollerViewProvider.provideHandleView() you can set the handle to be visible immediately, i.e. without having to touch the screen:
handle.setVisibility(View.VISIBLE);

emnrd-ito avatar Dec 07 '16 17:12 emnrd-ito

I haven't figured out how to make the handle permanently display yet. A kluge is to use withHideDelay() with a really long time:

    @Override
    protected ViewBehavior provideHandleBehavior() {

        VisibilityAnimationManager visibilityAnimationManager = new VisibilityAnimationManager.Builder(handle)
                .withHideDelay(1000000)
                .build();

        CustomHandleBehavior.HandleAnimationManager handleAnimationManager = new CustomHandleBehavior.HandleAnimationManager.Builder(handle)
                .withGrabAnimator(R.animator.custom_grab)
                .withReleaseAnimator(R.animator.custom_release)
                .build();

        return new CustomHandleBehavior(visibilityAnimationManager, handleAnimationManager);
    }

emnrd-ito avatar Dec 07 '16 17:12 emnrd-ito