BeksOmega / looping-layout

A looping LayoutManager for the Android RecyclerView.
Apache License 2.0
274 stars 16 forks source link

Make LoopingLayoutManager open to allow customizing its behavior #72

Closed Maxr1998 closed 1 year ago

Maxr1998 commented 1 year ago

:key: Use case

I'd love to be able to dynamically disable scrolling; for that, I need to override canScrollHorizonzally() or canScrollVertically().

:hammer: Proposal

Add the open keyword to the LoopingLayoutManager to allow extending it.

:wrench: Alternative

The reason I want to disable scrolling is that I'm using it as a pager, when there's just one element, scrolling should be prohibited.

:memo: Other info

N/A

:bee: Request for assignment

If possible, I would like to implement this.

BeksOmega commented 1 year ago

See https://github.com/BeksOmega/looping-layout/pull/70#issuecomment-1357950875 for more context on my opinions about open-ness.

But I think this is fine! So I'm going to go ahead and merge #73 =)

Sorry for the late response, it's been a very busy end-of-quarter hehe.

BeksOmega commented 1 year ago

Looks like I need to update how I'm publishing this package! I'll dig into this more this weekend =) Thank you for filing this issue + putting up the PR!

Maxr1998 commented 1 year ago

Thanks for the merge!

BeksOmega commented 1 year ago

@Maxr1998 0.5.0 has been released, which is basically just your change :P I had to update a lot of stuff to get the upload to complete successfully. So if you could check it out and tell me if it's working I would really appreciate it!

Hopefully this gives you the functionality you're looking for =)

Best wishes, --Beka

Maxr1998 commented 1 year ago

@BeksOmega thanks a lot! I just tried your release and didn't notice any issue.

I was already using the changes in my own release on GitHub Packages so that I could also get the fix from #69, but I nonetheless appreciate the swift response and update. Likewise, I just rebased my version on top of the latest changes.