Skip to content

Commit

Permalink
Prepares for release 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Sanson committed Sep 4, 2019
1 parent 4834084 commit 0ee158b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@ Change Log
Version 1.0.0 *(06-09-2018)*
----------------------------

* Initial release
* Initial release

Version 2.0.0 *(05-09-2019)*
----------------------------

* Migrates to AndroidX
* Adds optional support for disabling swipe refresh layouts during swipes
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## Download

```groovy
implementation 'nz.co.trademe.covert:covert:1.0.0'
implementation 'nz.co.trademe.covert:covert:2.0.0'
```

## Usage
Expand Down Expand Up @@ -42,6 +42,15 @@ override fun onBindViewHolder(viewHolder: RecyclerView.ViewHolder, index: Int) {
...
}
```
## Swipe Refresh Layouts
In some cases, swipe refresh layouts may consume touch events that Covert uses, leading to janky animations. To address this, you can add the following line to the builder.
```kotlin
Covert.with(covertConfig)
.setIsActiveCallback { ...}
.doOnSwipe { viewHolder, _ -> ...}
.disablePullToRefreshOnSwipe(swipeRefreshLayout)
.attachTo(recyclerView)
```

## Optimisations
Covert notifies the `RecyclerView` that the current `ViewHolder` has changed for each frame it draws. If the layout your using is complicated, this can sometimes drop frames and cause weird behaviour. To work around this, Covert triggers invalidations using a payload, which you can look for to skip a full rebind of your `ViewHolder`:
Expand Down
3 changes: 1 addition & 2 deletions common.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ext.version = "1.0.0"
ext.version = "2.0.0"
ext.group = "nz.co.trademe.covert"
ext.repo = "Covert"
ext.org = "trademe"
Expand All @@ -9,5 +9,4 @@ ext.compile_sdk = 29
ext.min_sdk = 15
ext.kotlin_version = '1.3.50'
ext.android_maven_version = '3.6.2'
ext.support_version = '28.0.0-rc02'
ext.android_gradle_plugin_version = '3.5.0'

0 comments on commit 0ee158b

Please sign in to comment.