From 26dfea3adbfc7158703f034c7ac467ef7ddb0c17 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 8 Dec 2016 21:27:13 +0100 Subject: [PATCH] add cab buttons for de/selecting all items --- .../gallery/adapters/MediaAdapter.kt | 16 ++++++++++++++++ app/src/main/res/menu/cab_media.xml | 9 +++++++++ app/src/main/res/mipmap-hdpi/select_all.png | Bin 0 -> 222 bytes app/src/main/res/mipmap-mdpi/select_all.png | Bin 0 -> 141 bytes app/src/main/res/mipmap-xhdpi/select_all.png | Bin 0 -> 196 bytes app/src/main/res/mipmap-xxhdpi/select_all.png | Bin 0 -> 262 bytes app/src/main/res/mipmap-xxxhdpi/select_all.png | Bin 0 -> 315 bytes app/src/main/res/values-de/strings.xml | 2 ++ app/src/main/res/values-es/strings.xml | 2 ++ app/src/main/res/values-it/strings.xml | 2 ++ app/src/main/res/values-ja/strings.xml | 2 ++ app/src/main/res/values-pt-rPT/strings.xml | 2 ++ app/src/main/res/values-ru/strings.xml | 2 ++ app/src/main/res/values-sv/strings.xml | 2 ++ app/src/main/res/values-zh/strings.xml | 2 ++ app/src/main/res/values/strings.xml | 2 ++ 16 files changed, 43 insertions(+) create mode 100644 app/src/main/res/mipmap-hdpi/select_all.png create mode 100644 app/src/main/res/mipmap-mdpi/select_all.png create mode 100644 app/src/main/res/mipmap-xhdpi/select_all.png create mode 100644 app/src/main/res/mipmap-xxhdpi/select_all.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/select_all.png diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt index 8bc9f3aea..561307860 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt @@ -80,6 +80,14 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList, displayCopyDialog() true } + R.id.cab_select_all -> { + selectAll() + true + } + R.id.cab_deselect_all -> { + deselectAll() + true + } R.id.cab_delete -> { askConfirmDelete() true @@ -165,6 +173,14 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList, }) } + fun selectAll() { + + } + + fun deselectAll() { + + } + private fun askConfirmDelete() { ConfirmationDialog(activity) { actMode?.finish() diff --git a/app/src/main/res/menu/cab_media.xml b/app/src/main/res/menu/cab_media.xml index 006a9091b..f4f161ce2 100644 --- a/app/src/main/res/menu/cab_media.xml +++ b/app/src/main/res/menu/cab_media.xml @@ -26,6 +26,15 @@ android:icon="@mipmap/edit" android:title="@string/edit" app:showAsAction="ifRoom"/> + + |k0wldT1B8LpQcoAh5Rc<;ryk^OP~dSbHRxbo zU|cHCzwSUn`@6ANPM-)?2f|`Ig(+{Y5f6&6ta>r@f6b*u*=hLo%q8=~m6f V+iRLH`2iiw;OXk;vd$@?2>=Q7QQZIl literal 0 HcmV?d00001 diff --git a/app/src/main/res/mipmap-mdpi/select_all.png b/app/src/main/res/mipmap-mdpi/select_all.png new file mode 100644 index 0000000000000000000000000000000000000000..966938b9d80caa24112f10bbca8bb76551ccffff GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM0wlfaz7_+i5KkA!5R22v2@-1_)Iaz?Jwb|N z!=?5AelO0d=yXzopr0Q-+H?*IS* literal 0 HcmV?d00001 diff --git a/app/src/main/res/mipmap-xhdpi/select_all.png b/app/src/main/res/mipmap-xhdpi/select_all.png new file mode 100644 index 0000000000000000000000000000000000000000..b99012a3b32dcbe42e55aa6d5f98e2b8cef0b444 GIT binary patch literal 196 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA0wn)(8}b0DZci7-kch)?r=R9(P!MqaJ?q2! zt9Cjrcki18b_YoZ>+DE3?=c;qxo-UYSlnB< u@!fC6NW zVXx!%pCKR4hp}w5zPxP1j|yi!=AY-@HoaKyDR9Zt^7$O)i9ZW2iUxmK{z_cB2ytiMwBMzRzSz znc(I6qN(NIQFQwE^id}l_5W}Z*>r7|ZJnjb9>1j^a|f18!a%Y0TUgNr$p z_eybFgW06Iqm?1-xqlYCH>z?Id#ANv_Dr8omMXoDY?3J#^#3dTxO?qJW-8EQ44$rj JF6*2UngB$oYYhMZ literal 0 HcmV?d00001 diff --git a/app/src/main/res/mipmap-xxxhdpi/select_all.png b/app/src/main/res/mipmap-xxxhdpi/select_all.png new file mode 100644 index 0000000000000000000000000000000000000000..896e1ac21415142a5a687867e0dae4e1b210359d GIT binary patch literal 315 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD0wg^q?%&M7z{uq3;uunK>+LOHt|kYG_QLX; ziB4A8U7KI%D9S2boc!ci{c5gB2P$(v_0CJbDR9>R8S^0>WhEu0McXsiFNiz*0sa`@x=%fsQ+Ce?5O9JjeK+1n2qX`;8n{Ri1iO^Zg|KH%Adh4a(G?{{{uI!g@sRRA-Yj)n+H8X!cd@T9~WUQyFpUXO@geCwc CUVg~{ literal 0 HcmV?d00001 diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index f0b579b30..8543cd5f1 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -49,6 +49,8 @@ Show all media files All media Switch to folder view + Select all + Deselect all 1 Ordner gelöscht diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index ebb193eeb..f7cf1110f 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -49,6 +49,8 @@ Show all media files All media Switch to folder view + Select all + Deselect all 1 carpeta eliminada diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 6bd3fa967..d735edb4b 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -49,6 +49,8 @@ Show all media files All media Switch to folder view + Select all + Deselect all 1 cartella eliminata diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 06a5b514d..6eb472a44 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -49,6 +49,8 @@ Show all media files All media Switch to folder view + Select all + Deselect all 1 フォルダーを削除しました diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index 1691438ed..7b1d01ea2 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -49,6 +49,8 @@ Mostrar todos os ficheiros multimédia Multimédia Alternar para a vista de pastas + Select all + Deselect all 1 pasta apagada diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 180d20a43..25eb9666c 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -50,6 +50,8 @@ Отобразить все медиафайлы Все медиафайлы Переключиться к виду с папками + Select all + Deselect all 1 папка удалена diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 0f6928044..0d38460fa 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -49,6 +49,8 @@ Show all media files All media Switch to folder view + Select all + Deselect all 1 mapp borttagen diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index 2587fe83b..2b25f784e 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -50,6 +50,8 @@ Show all media files All media Switch to folder view + Select all + Deselect all 1 folder deleted diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8b87a371e..50ec5f1dc 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -49,6 +49,8 @@ Show all media files All media Switch to folder view + Select all + Deselect all 1 folder deleted