From e05ef4a9f25ad3ec9b98418f29a87d80ed4e3ec7 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 6 Jun 2017 20:00:45 +0200 Subject: [PATCH] add the menu buttons for changing album cover --- .../gallery/adapters/DirectoryAdapter.kt | 7 +++++++ app/src/main/res/menu/cab_directories.xml | 13 +++++++++++++ 2 files changed, 20 insertions(+) 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 4a5876a18..4a60982f6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -111,6 +111,8 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList copyMoveTo(false) R.id.cab_select_all -> selectAll() R.id.cab_delete -> askConfirmDelete() + R.id.cab_select_photo -> changeAlbumCover(false) + R.id.cab_use_default -> changeAlbumCover(true) else -> return false } return true @@ -125,6 +127,7 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList { val paths = HashSet(selectedPositions.size) selectedPositions.forEach { paths.add(dirs[it].path) } diff --git a/app/src/main/res/menu/cab_directories.xml b/app/src/main/res/menu/cab_directories.xml index 1a7c733a8..2267e4c6e 100644 --- a/app/src/main/res/menu/cab_directories.xml +++ b/app/src/main/res/menu/cab_directories.xml @@ -48,6 +48,19 @@ android:icon="@drawable/ic_select_all" android:title="@string/select_all" app:showAsAction="ifRoom"/> + + + + + +