diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 379afc3..8362197 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -27,7 +27,7 @@ jobs: with: java-version: 1.8 - name: Install Android SDK - uses: malinskiy/action-android/install-sdk@release/0.0.5 + uses: malinskiy/action-android/install-sdk@release/0.1.2 - name: Run unit tests run: ./gradlew testDebugUnitTest --stacktrace -Pbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_apikey=${{ secrets.BINTRAY_KEY }} - name: Assemble library diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index f541c8e..38d14db 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -21,7 +21,7 @@ jobs: with: java-version: 1.8 - name: Install Android SDK - uses: malinskiy/action-android/install-sdk@release/0.0.5 + uses: malinskiy/action-android/install-sdk@release/0.1.2 - name: Run unit tests run: ./gradlew testDebugUnitTest --stacktrace -Pbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_apikey=${{ secrets.BINTRAY_KEY }} - name: Assemble library diff --git a/CHANGELOG.md b/CHANGELOG.md index 68d1370..1140b3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.2.2 + +- Fixed IllegalArgumentException being incorrectly thrown in `GravitySnapRecyclerView` when Gravity.CENTER is used. + ## 2.2.1 - Fixed `GravitySnapHelper` not dispatching snap events for edge items sometimes on `SnapListener` diff --git a/README.md b/README.md index cd3c329..f5de518 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A SnapHelper that snaps a RecyclerView to an edge. Add this to your build.gradle: ```groovy -implementation 'com.github.rubensousa:gravitysnaphelper:2.2.0' +implementation 'com.github.rubensousa:gravitysnaphelper:2.2.2' ``` ## How to use diff --git a/gradle.properties b/gradle.properties index 44db032..e1ffc29 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true LIBRARY_GROUP=com.github.rubensousa -LIBRARY_VERSION=2.2.1 +LIBRARY_VERSION=2.2.2 LIBRARY_ARTIFACT=gravitysnaphelper POM_NAME=GravitySnapHelper POM_DESCRIPTION=A SnapHelper that snaps the RecyclerView to an edge diff --git a/gravitysnaphelper/src/main/java/com/github/rubensousa/gravitysnaphelper/GravitySnapRecyclerView.java b/gravitysnaphelper/src/main/java/com/github/rubensousa/gravitysnaphelper/GravitySnapRecyclerView.java index 0166041..5a6710c 100644 --- a/gravitysnaphelper/src/main/java/com/github/rubensousa/gravitysnaphelper/GravitySnapRecyclerView.java +++ b/gravitysnaphelper/src/main/java/com/github/rubensousa/gravitysnaphelper/GravitySnapRecyclerView.java @@ -66,6 +66,7 @@ public GravitySnapRecyclerView(@NonNull Context context, @Nullable AttributeSet break; case 4: snapHelper = new GravitySnapHelper(Gravity.CENTER); + break; default: throw new IllegalArgumentException("Invalid gravity value. Use START " + "| END | BOTTOM | TOP | CENTER constants");