summaryrefslogtreecommitdiffhomepage
path: root/android/src
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-10-22 20:14:29 +0000
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-10-23 10:22:14 -0300
commit844b9a932a4d782a302b2f021011c990e695223d (patch)
tree5d621fa1d47c33b46a54e2e673f50b4cc9d933f3 /android/src
parent40fc5e3b6fff6ac163d31bd72804d6cdb981b094 (diff)
downloadmullvadvpn-844b9a932a4d782a302b2f021011c990e695223d.tar.xz
mullvadvpn-844b9a932a4d782a302b2f021011c990e695223d.zip
Intercept scroll events from item animations
Diffstat (limited to 'android/src')
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/CustomRecyclerView.kt8
1 files changed, 8 insertions, 0 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/CustomRecyclerView.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/CustomRecyclerView.kt
index dd0392c3bb..ac97b4d831 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/CustomRecyclerView.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/CustomRecyclerView.kt
@@ -19,6 +19,14 @@ class CustomRecyclerView : RecyclerView, ListenableScrollableView {
super(context, attributes, defaultStyleAttribute) {
}
+ init {
+ itemAnimator = CustomItemAnimator().apply {
+ onMove = { horizontalDelta, verticalDelta ->
+ dispatchScrollEvent(horizontalDelta, verticalDelta)
+ }
+ }
+ }
+
override fun onScrolled(horizontalDelta: Int, verticalDelta: Int) {
super.onScrolled(horizontalDelta, verticalDelta)