diff --git a/README.MD b/README.MD index 551e3b04..6899051a 100644 --- a/README.MD +++ b/README.MD @@ -31,6 +31,7 @@ Check the official website for more information and recipes: https://rubensousa. ### Layout - Supports grids with different span sizes +- Supports infinite/endless scrolling - Supports reverse layout - XML attributes for easier configuration diff --git a/docs/changelog.md b/docs/changelog.md index 517dde2b..e128cec8 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,17 @@ # Changelog +## Version 1.1.0 + +### 1.1.0-alpha01 + +2023-06-08 + +#### New Features + +- Added support for endless scrolling with looping adapter contents: ([#20](https://github.com/rubensousa/DpadRecyclerView/issues/20)). + Check [this](recipes/layout.md#looping-adapter-contents) for more information. + + ## Version 1.0.0 ### 1.0.0 diff --git a/docs/index.md b/docs/index.md index 76caa587..7ab960d6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -12,6 +12,7 @@ Motivation for this library is available in my [blog](https://rubensousa.com/202 ### Layout - Grids with different span sizes +- Infinite loop - Reverse layout - XML attributes for easier configuration diff --git a/docs/recipes/layout.md b/docs/recipes/layout.md index 09291181..ce2a9de0 100644 --- a/docs/recipes/layout.md +++ b/docs/recipes/layout.md @@ -92,6 +92,22 @@ recyclerView.setSpanSizeLookup(object : DpadSpanSizeLookup() { }) ``` +## Looping adapter contents + +You can enable infinite scrolling by using `setLoopDirection` to loop the adapter contents: + +```kotlin linenums="1" +// This will loop when scrolling towards both the start and end edges +recyclerView.setLoopDirection(DpadLoopDirection.MIN_MAX) + +// This will loop only when scrolling towards the end +recyclerView.setLoopDirection(DpadLoopDirection.MAX) +``` + +!!! note + Looping is only supported when there's enough items to fill the viewport + + ## Extra layout space `DpadRecyclerView` won't layout any extra space by default, however, diff --git a/gradle.properties b/gradle.properties index ad3a1e9c..652ce793 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,4 +22,4 @@ kotlin.code.style=official # thereby reducing the size of the R class for that library android.nonTransitiveRClass=true android.enableR8.fullMode=true -LIBRARY_VERSION=1.0.0 \ No newline at end of file +LIBRARY_VERSION=1.1.0-alpha01 \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index f879c169..68bbcb9c 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -24,7 +24,7 @@ theme: extra: dpadrecyclerview: - version: '1.0.0' + version: '1.1.0-alpha01' social: - icon: 'fontawesome/brands/github' link: 'https://github.com/rubensousa/DpadRecyclerView'