Skip to content

Support custom RecyclerView preload positions#5698

Open
sorinc03 wants to merge 2 commits into
bumptech:masterfrom
sorinc03:fix/recyclerview-preloader-position-provider
Open

Support custom RecyclerView preload positions#5698
sorinc03 wants to merge 2 commits into
bumptech:masterfrom
sorinc03:fix/recyclerview-preloader-position-provider

Conversation

@sorinc03

Copy link
Copy Markdown

Description

Adds a small RecyclerViewPositionProvider API so RecyclerViewPreloader can be used with custom LayoutManager implementations instead of requiring a LinearLayoutManager subclass. The existing constructor keeps the LinearLayoutManager behavior, and the new constructor lets callers provide their own visible-position metadata.

This also fixes the default LinearLayoutManager visible item count conversion to include both endpoints.

Fixes #493.

Validation

  • JAVA_HOME=/Users/sorincioban/.gradle/jdks/eclipse_adoptium-17-aarch64-os_x.2/jdk-17.0.19+10/Contents/Home ./gradlew --configure-on-demand :integration:recyclerview:testDebugUnitTest
  • JAVA_HOME=/Users/sorincioban/.gradle/jdks/eclipse_adoptium-17-aarch64-os_x.2/jdk-17.0.19+10/Contents/Home ./gradlew --configure-on-demand :integration:recyclerview:lintDebug
  • git diff --check

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

Successfully merging this pull request may close these issues.

Support arbitrary LayoutManagers in RecyclerView integration package

1 participant