-
Notifications
You must be signed in to change notification settings - Fork 617
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from rubensousa/develop
2.2.0
- Loading branch information
Showing
46 changed files
with
1,605 additions
and
955 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# Changelog | ||
|
||
## 2.2.0 | ||
|
||
### New features | ||
- Added Gravity.CENTER support ([#21](https://github.com/rubensousa/GravitySnapHelper/issue/21)) | ||
- Added setMaxFlingDistance and setMaxFlingSizeFraction to change the max fling distance allowed ([#29](https://github.com/rubensousa/GravitySnapHelper/issue/29)) | ||
- Added setSnapToPadding to allow snapping to the padding set in the RecyclerView. Defaults to false ([#58](https://github.com/rubensousa/GravitySnapHelper/issue/58)) | ||
- Added GravitySnapRecyclerView that uses GravitySnapHelper by default | ||
- Added setGravity to change the gravity of GravitySnapHelper | ||
- Added setScrollMsPerInch to change the scroll speed | ||
- Added setSnapListener to allow changing the SnapListener that was set or clearing it | ||
- GravityPagerSnapHelper is now deprecated. Use GravitySnapHelper together with setMaxFlingSizeFraction() to achieve the same behavior | ||
- Added updateSnap to update the snap position if for some reason snapping was stopped | ||
|
||
### Improvements | ||
|
||
- Improved behavior when smoothScrollToPosition is called. Now the smooth scroller is used | ||
- Added getters to all relevant properties | ||
- getCurrentSnappedPosition now searches for the correct snap view instead of returning the last position that we snapped to | ||
- Added missing NonNull and Nullable annotations | ||
|
||
## 2.1.0 | ||
|
||
- OrientationAwareRecyclerView now doesn't depend on LinearLayoutManager directly | ||
- Fixed SnapListener not being called for the first position sometimes (#57) | ||
- Added getCurrentSnappedPosition to GravitySnapHelper and GravityPagerSnapHelper | ||
|
||
## 2.0 | ||
|
||
### New features: | ||
- Migrated to AndroidX. | ||
- Added smoothScrollToPosition and scrollToPosition methods that'll snap to a certain position. | ||
- Added OrientationAwareRecyclerView that only handles scroll events according to its orientation. | ||
|
||
### Bug fixes: | ||
- Fixed snapping not working correctly for RecyclerViews with padding (#49) | ||
- Fixed snapping not considering GridLayoutManager.SpanSizeLookup (#52) | ||
|
||
## 1.5 | ||
|
||
- Fixed reverse layout causing scrolling issues (#40) | ||
|
||
## 1.4 | ||
|
||
- Added Nullable and NonNull annotations | ||
- Updated support library | ||
|
||
## 1.3 | ||
|
||
- Fixed IllegalStateException being thrown when SnapHelper is attached twice to a RecyclerView (#23) | ||
- Bumped min sdk to 14 | ||
|
||
## 1.2 | ||
|
||
- Added support for GridLayoutManager | ||
|
||
## 1.1 | ||
|
||
- Added GravityPagerSnapHelper | ||
- Updated support library | ||
|
||
## 1.0 | ||
|
||
- GravitySnapHelper extends from LinearSnapHelper again | ||
- Added SnapListener to listen for snap events | ||
|
||
|
||
## 0.3 | ||
|
||
- Extend from SnapHelper until https://code.google.com/p/android/issues/detail?id=223649 gets fixed. | ||
|
||
## 0.2 | ||
|
||
- Added RTL support | ||
- Fixed GravitySnapHelper scrolling too far sometimes (#2) | ||
- Added support to snap last items via enableLastItemSnap(boolean enable) | ||
|
||
|
||
## 0.1 | ||
|
||
- Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,30 @@ | ||
apply plugin: 'com.android.application' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'kotlin-android-extensions' | ||
|
||
android { | ||
compileSdkVersion rootProject.ext.compileSdkVersion | ||
|
||
defaultConfig { | ||
applicationId "com.github.rubensousa.recyclerviewsnap" | ||
minSdkVersion rootProject.ext.minSdkVersion | ||
minSdkVersion 19 | ||
targetSdkVersion rootProject.ext.targetSdkVersion | ||
versionCode 1 | ||
versionName "1.0" | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility 1.8 | ||
targetCompatibility 1.8 | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation 'androidx.core:core-ktx:1.0.2' | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
implementation project(':gravitysnaphelper') | ||
implementation 'com.google.android.material:material:1.1.0-alpha01' | ||
implementation 'com.google.android.material:material:1.1.0-alpha09' | ||
implementation 'androidx.appcompat:appcompat:1.0.2' | ||
implementation 'androidx.recyclerview:recyclerview:1.0.0' | ||
implementation 'androidx.cardview:cardview:1.0.0' | ||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | ||
} |
77 changes: 0 additions & 77 deletions
77
app/src/main/java/com/github/rubensousa/recyclerviewsnap/Adapter.java
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
app/src/main/java/com/github/rubensousa/recyclerviewsnap/App.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.