From 733e9403ddb98f2f552f754cf5d64f70282b1441 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 6 Nov 2017 17:59:54 +0100 Subject: [PATCH] fix #420, increase the max column count to 20 --- .../com/simplemobiletools/gallery/activities/MainActivity.kt | 4 ++-- .../com/simplemobiletools/gallery/activities/MediaActivity.kt | 4 ++-- .../kotlin/com/simplemobiletools/gallery/helpers/Constants.kt | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt index 879da62ce..d20cbb97a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -94,7 +94,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { menuInflater.inflate(R.menu.menu_main_intent, menu) } else { menuInflater.inflate(R.menu.menu_main, menu) - menu.findItem(R.id.increase_column_count).isVisible = config.viewTypeFolders == VIEW_TYPE_GRID && config.dirColumnCnt < 10 + menu.findItem(R.id.increase_column_count).isVisible = config.viewTypeFolders == VIEW_TYPE_GRID && config.dirColumnCnt < MAX_COLUMN_COUNT menu.findItem(R.id.reduce_column_count).isVisible = config.viewTypeFolders == VIEW_TYPE_GRID && config.dirColumnCnt > 1 } menu.findItem(R.id.temporarily_show_hidden).isVisible = !config.shouldShowHidden @@ -343,7 +343,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { } override fun zoomOut() { - if (layoutManager.spanCount < 10) { + if (layoutManager.spanCount < MAX_COLUMN_COUNT) { increaseColumnCount() getRecyclerAdapter().actMode?.finish() } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index 683eb5ffd..b0bcdee3b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -231,7 +231,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { findItem(R.id.temporarily_show_hidden).isVisible = !config.shouldShowHidden findItem(R.id.stop_showing_hidden).isVisible = config.temporarilyShowHidden - findItem(R.id.increase_column_count).isVisible = config.viewTypeFiles == VIEW_TYPE_GRID && config.mediaColumnCnt < 10 + findItem(R.id.increase_column_count).isVisible = config.viewTypeFiles == VIEW_TYPE_GRID && config.mediaColumnCnt < MAX_COLUMN_COUNT findItem(R.id.reduce_column_count).isVisible = config.viewTypeFiles == VIEW_TYPE_GRID && config.mediaColumnCnt > 1 findItem(R.id.toggle_filename).isVisible = config.viewTypeFiles == VIEW_TYPE_GRID @@ -419,7 +419,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { } override fun zoomOut() { - if (layoutManager.spanCount < 10) { + if (layoutManager.spanCount < MAX_COLUMN_COUNT) { increaseColumnCount() getRecyclerAdapter().actMode?.finish() } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt index 23b5a2673..b9ebd1071 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt @@ -56,6 +56,7 @@ val SLIDESHOW_DEFAULT_INTERVAL = 5 val SLIDESHOW_SCROLL_DURATION = 500L val NOMEDIA = ".nomedia" +val MAX_COLUMN_COUNT = 20 val DIRECTORY = "directory" val MEDIUM = "medium"