From 1e37c47bd0af413838ceb699ef648003650da5ad Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 26 Feb 2017 18:12:23 +0100 Subject: [PATCH] add menu items for excluding folders --- .../simplemobiletools/gallery/activities/MediaActivity.kt | 5 +++++ .../simplemobiletools/gallery/adapters/DirectoryAdapter.kt | 5 +++++ app/src/main/res/menu/cab_directories.xml | 4 ++++ app/src/main/res/menu/menu_media.xml | 4 ++++ 4 files changed, 18 insertions(+) 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 500ff30a0..348284271 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -119,6 +119,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { R.id.folder_view -> switchToFolderView() R.id.hide_folder -> hideFolder() R.id.unhide_folder -> unhideFolder() + R.id.exclude_folder -> excludeFolder() R.id.increase_column_count -> increaseColumnCount() R.id.reduce_column_count -> reduceColumnCount() R.id.settings -> launchSettings() @@ -165,6 +166,10 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { } } + private fun excludeFolder() { + + } + private fun deleteDirectoryIfEmpty() { val file = File(mPath) if (file.isDirectory && file.listFiles()?.isEmpty() == true) { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt index c30a1955a..4797838f5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -78,6 +78,7 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList pinFolders(false) R.id.cab_hide -> toggleFoldersVisibility(true) R.id.cab_unhide -> toggleFoldersVisibility(false) + R.id.exclude_folder -> excludeFolder() R.id.cab_copy_move -> displayCopyDialog() R.id.cab_select_all -> selectAll() R.id.cab_delete -> askConfirmDelete() @@ -184,6 +185,10 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList + +