From 9e90bccad5d6a00de5921a69d6f92e6782669fac Mon Sep 17 00:00:00 2001 From: Elizabeth Popova Date: Fri, 19 Feb 2021 22:29:17 +0200 Subject: [PATCH] Bump to 1.1.0: migrate to AndroidX Updated links to classes in README.md to AndroidX ones. --- README.md | 14 +++++++------- app/build.gradle | 4 ++-- build.gradle | 4 ++-- sectionedrecyclerview/publish.gradle | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 925519d..5091b6a 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Sectioned RecyclerView with pinnable (floating/sticky) headers -[![Bintray](https://img.shields.io/bintray/v/cruxlab/SectionedRecyclerView/SectionedRecyclerView?color=bright-green)](https://bintray.com/cruxlab/SectionedRecyclerView/SectionedRecyclerView/1.0.3) -[![Nuget](https://img.shields.io/nuget/v/Karamunting.Android.CruxLab.SectionedRecyclerView?color=bright-green)](https://www.nuget.org/packages/Karamunting.Android.CruxLab.SectionedRecyclerView/1.0.2) +[![Bintray](https://img.shields.io/bintray/v/cruxlab/SectionedRecyclerView/SectionedRecyclerView?color=bright-green)](https://bintray.com/cruxlab/SectionedRecyclerView/SectionedRecyclerView/1.1.0) +[![Nuget](https://img.shields.io/nuget/v/Karamunting.Android.CruxLab.SectionedRecyclerView?color=bright-green)](https://www.nuget.org/packages/Karamunting.Android.CruxLab.SectionedRecyclerView/1.0.3) [![API](https://img.shields.io/badge/API-16%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=16) -This library allows you to divide items in your RecyclerView into groups called sections. Each section is represented by an adapter and can have a header. SectionAdapter is similar to Android’s [RecyclerView.Adapter](https://developer.android.com/reference/android/support/v7/widget/RecyclerView.Adapter.html), which creates and binds ViewHolders. The header can be pinned, which means, that it will be displayed at the top of the RecyclerView above the corresponding section items. Pinned headers change automatically while scrolling or after dataset changes. You can also customize item swiping behavior for each section individually. +This library allows you to divide items in your RecyclerView into groups called sections. Each section is represented by an adapter and can have a header. SectionAdapter is similar to Android’s [RecyclerView.Adapter](https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView.Adapter), which creates and binds ViewHolders. The header can be pinned, which means, that it will be displayed at the top of the RecyclerView above the corresponding section items. Pinned headers change automatically while scrolling or after dataset changes. You can also customize item swiping behavior for each section individually. ## Demo @@ -27,7 +27,7 @@ You can find demo project code [here](https://github.com/crux-lab/sectioned-recy The Gradle dependency is available via [jCenter](https://bintray.com/cruxlab/SectionedRecyclerView/SectionedRecyclerView). Add this to your module's `build.gradle` file: ```gradle -implementation 'com.cruxlab:sectionedrecyclerview:1.0.3' +implementation 'com.cruxlab:sectionedrecyclerview:1.1.0' ``` ### Initialization @@ -103,7 +103,7 @@ public class MyItemViewHolder extends BaseSectionAdapter.ItemViewHolder { } ``` -As you can see, these classes are similar to Android’s [RecyclerView.Adapter](https://developer.android.com/reference/android/support/v7/widget/RecyclerView.Adapter.html) and [RecyclerView.ViewHolder](https://developer.android.com/reference/android/support/v7/widget/RecyclerView.ViewHolder.html). +As you can see, these classes are similar to Android’s [RecyclerView.Adapter](https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView.Adapter) and [RecyclerView.ViewHolder](https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView.ViewHolder). Adapter for a section with header has some additional methods to override: @@ -147,7 +147,7 @@ To use floating headers feature, you have to place your `RecyclerView` into `Sec android:layout_width="match_parent" android:layout_height="match_parent"> - @@ -186,7 +186,7 @@ ItemTouchHelper itemTouchHelper = new ItemTouchHelper(callback); itemTouchHelper.attachToRecyclerView(recyclerView); ``` -Implement `SectionItemSwipeCallback`, which is similar to Android's [ItemTouchHelper.Callback](https://developer.android.com/reference/android/support/v7/widget/helper/ItemTouchHelper.Callback.html): +Implement `SectionItemSwipeCallback`, which is similar to Android's [ItemTouchHelper.Callback](https://developer.android.com/reference/androidx/recyclerview/widget/ItemTouchHelper.Callback): ```java public class MySwipeCallback extends SectionItemSwipeCallback { diff --git a/app/build.gradle b/app/build.gradle index fe51ec9..07c222f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -22,6 +22,6 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation 'androidx.recyclerview:recyclerview:1.1.0' -// implementation 'com.cruxlab:sectionedrecyclerview:1.0.3' - implementation project(':sectionedrecyclerview'); + implementation 'com.cruxlab:sectionedrecyclerview:1.1.0' +// implementation project(':sectionedrecyclerview'); } diff --git a/build.gradle b/build.gradle index 6527588..cc10e64 100644 --- a/build.gradle +++ b/build.gradle @@ -8,8 +8,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:4.1.2' - classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/sectionedrecyclerview/publish.gradle b/sectionedrecyclerview/publish.gradle index 4ba5211..1b46620 100644 --- a/sectionedrecyclerview/publish.gradle +++ b/sectionedrecyclerview/publish.gradle @@ -1,7 +1,7 @@ apply plugin: 'maven-publish' apply plugin: 'com.jfrog.bintray' -version '1.0.3' +version '1.1.0' group 'com.cruxlab' publishing {