diff --git a/CHANGELOG.md b/CHANGELOG.md index 3711227..66b2f50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,4 +4,10 @@ Change Log Version 1.0.0 *(06-09-2018)* ---------------------------- - * Initial release \ No newline at end of file + * Initial release + +Version 2.0.0 *(05-09-2019)* +---------------------------- + + * Migrates to AndroidX + * Adds optional support for disabling swipe refresh layouts during swipes \ No newline at end of file diff --git a/README.md b/README.md index 431b10c..caeca87 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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`: diff --git a/common.gradle b/common.gradle index 7259b4b..ac20346 100644 --- a/common.gradle +++ b/common.gradle @@ -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" @@ -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' \ No newline at end of file