From c9468b754db140ae4ee14d5625e0d214e34b44f8 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 14 Jan 2023 16:36:10 +0100 Subject: [PATCH] fix #2723, do not use transparent navigation with horizontal scrolling --- .../simplemobiletools/gallery/pro/activities/MainActivity.kt | 4 ++-- .../simplemobiletools/gallery/pro/activities/MediaActivity.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt index 1082e0c98..8073e881c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt @@ -109,7 +109,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { setupOptionsMenu() refreshMenuItems() - updateMaterialActivityViews(directories_coordinator, directories_grid, useTransparentNavigation = true, useTopSearchMenu = true) + updateMaterialActivityViews(directories_coordinator, directories_grid, useTransparentNavigation = !config.scrollHorizontally, useTopSearchMenu = true) directories_refresh_layout.setOnRefreshListener { getDirectories() } storeStateVariables() @@ -334,7 +334,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { } main_menu.getToolbar().inflateMenu(menuId) - main_menu.toggleHideOnScroll(true) + main_menu.toggleHideOnScroll(!config.scrollHorizontally) main_menu.setupMenu() main_menu.onSearchOpenListener = { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt index 7ea5ede18..ef60b6362 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt @@ -96,7 +96,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { setupOptionsMenu() refreshMenuItems() storeStateVariables() - updateMaterialActivityViews(media_coordinator, media_grid, useTransparentNavigation = true, useTopSearchMenu = true) + updateMaterialActivityViews(media_coordinator, media_grid, useTransparentNavigation = !config.scrollHorizontally, useTopSearchMenu = true) if (mShowAll) { registerFileUpdateListener() @@ -257,7 +257,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { private fun setupOptionsMenu() { media_menu.getToolbar().inflateMenu(R.menu.menu_media) - media_menu.toggleHideOnScroll(true) + media_menu.toggleHideOnScroll(!config.scrollHorizontally) media_menu.setupMenu() media_menu.onSearchTextChangedListener = { text ->