From 112b816b9e82b776a76a1c61e1d6d902b8078646 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 16 Jan 2021 17:33:34 +0100 Subject: [PATCH] recalculate recyclerview height at using Search --- app/build.gradle | 2 +- .../filemanager/pro/fragments/ItemsFragment.kt | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 99a447d7..7c0d79b8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -58,7 +58,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.32.24' + implementation 'com.simplemobiletools:commons:5.32.27' implementation 'com.github.Stericson:RootTools:df729dcb13' implementation 'com.github.Stericson:RootShell:1.6' implementation 'com.alexvasilkov:gesture-views:2.5.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/ItemsFragment.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/ItemsFragment.kt index 9e4e0f78..7f4bdaab 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/ItemsFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/ItemsFragment.kt @@ -369,6 +369,11 @@ class ItemsFragment : Fragment(), ItemOperationsListener, Breadcrumbs.Breadcrumb items_list.beVisibleIf(listItems.isNotEmpty()) items_placeholder.beVisibleIf(listItems.isEmpty()) items_placeholder_2.beGone() + + items_list.onGlobalLayout { + items_fastscroller.setScrollToY(items_list.computeVerticalScrollOffset()) + calculateContentHeight(listItems) + } } } }