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

Set correct scroller shape depending on orientation

Open pgp opened this issue 4 years ago • 0 comments

I am developing a simple gallery application, and I want to be able to choose between orientations (horizontal/landscape, and vertical/portrait), and to have fast scrolling on both.

After trying a few libraries, I succeeded with this one; however, I did not manage to explicitly set the shape of the fast scroll cursor, it is always horizontal, even with vertical orientation for my recyclerview.

The orientation change is performed at runtime via a button; instead, if I set orientation statically for the FastScroller view from xml file (and the GridLayoutManager orientation accordingly on app start), everything works fine, so I think this wrong behaviour is due to some additional view attribute that gets set automatically and correctly in the latter case, but not in the former. Any suggestion?

If you'd like to have look at the behaviour I'm talking about, the sample app is available here, and it reads images from DCIM/Camera (I'm testing it with 500 images)

pgp avatar Sep 03 '20 15:09 pgp