looping-layout icon indicating copy to clipboard operation
looping-layout copied to clipboard

Add SnapHelper Support

Open BeksOmega opened this issue 6 years ago • 2 comments

:key: Use case

Snapping is wonderful and supported by the default LayoutManager. The LoopingLayoutManager should support snapping as well.

:hammer: Proposal

It seems like snapping is partially supported by default, but to get a better animation the LoopingLayoutManager needs to implement the RecyclerView.SmoothScroller.ScrollVectorProvider interface.

This may be complicated by the fact there can be multiple views associated with the same adapter position. Or it may not if the SnapHelpers look at coordinates rather than adapter indicies.

It will probably also be complicated by the fact that you can loop around to see an item again. But this area really needs more research.

The default SnapHelpers should also be tested with the LoopingLayoutManager, and unit tests should probably be written.

:wrench: Alternative

N/A

:memo: Other info

N/A

:bee: Request for assignment

I'm just requesting this feature. But I don't mind implementing it.

BeksOmega avatar Dec 11 '19 17:12 BeksOmega

I'll take this one.

BeksOmega avatar Jan 24 '20 00:01 BeksOmega

This issue is on ice until I get a response on the android usergroup, or create an issue with the AOSP.

BeksOmega avatar Jan 31 '20 21:01 BeksOmega