From d4669d32dbd25179e36fda90da4e4d19bb09d317 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 8 Jan 2018 16:46:25 +0100 Subject: [PATCH] close search on stop --- .../filemanager/activities/MainActivity.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt index d3bd4fed..308f7714 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt @@ -75,6 +75,13 @@ class MainActivity : SimpleActivity() { storeStateVariables() } + override fun onStop() { + super.onStop() + if (searchMenuItem != null) { + MenuItemCompat.collapseActionView(searchMenuItem) + } + } + override fun onDestroy() { super.onDestroy() config.temporarilyShowHidden = false