mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 13:08:00 +01:00
add cab buttons for de/selecting all items
This commit is contained in:
parent
5c9c0d4ac9
commit
26dfea3adb
16 changed files with 43 additions and 0 deletions
|
@ -80,6 +80,14 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
||||||
displayCopyDialog()
|
displayCopyDialog()
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
R.id.cab_select_all -> {
|
||||||
|
selectAll()
|
||||||
|
true
|
||||||
|
}
|
||||||
|
R.id.cab_deselect_all -> {
|
||||||
|
deselectAll()
|
||||||
|
true
|
||||||
|
}
|
||||||
R.id.cab_delete -> {
|
R.id.cab_delete -> {
|
||||||
askConfirmDelete()
|
askConfirmDelete()
|
||||||
true
|
true
|
||||||
|
@ -165,6 +173,14 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun selectAll() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fun deselectAll() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private fun askConfirmDelete() {
|
private fun askConfirmDelete() {
|
||||||
ConfirmationDialog(activity) {
|
ConfirmationDialog(activity) {
|
||||||
actMode?.finish()
|
actMode?.finish()
|
||||||
|
|
|
@ -26,6 +26,15 @@
|
||||||
android:icon="@mipmap/edit"
|
android:icon="@mipmap/edit"
|
||||||
android:title="@string/edit"
|
android:title="@string/edit"
|
||||||
app:showAsAction="ifRoom"/>
|
app:showAsAction="ifRoom"/>
|
||||||
|
<item
|
||||||
|
android:id="@+id/cab_select_all"
|
||||||
|
android:icon="@mipmap/select_all"
|
||||||
|
android:title="@string/select_all"
|
||||||
|
app:showAsAction="ifRoom"/>
|
||||||
|
<item
|
||||||
|
android:id="@+id/cab_deselect_all"
|
||||||
|
android:title="@string/deselect_all"
|
||||||
|
app:showAsAction="never"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/cab_delete"
|
android:id="@+id/cab_delete"
|
||||||
android:icon="@mipmap/delete"
|
android:icon="@mipmap/delete"
|
||||||
|
|
BIN
app/src/main/res/mipmap-hdpi/select_all.png
Normal file
BIN
app/src/main/res/mipmap-hdpi/select_all.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 222 B |
BIN
app/src/main/res/mipmap-mdpi/select_all.png
Normal file
BIN
app/src/main/res/mipmap-mdpi/select_all.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 141 B |
BIN
app/src/main/res/mipmap-xhdpi/select_all.png
Normal file
BIN
app/src/main/res/mipmap-xhdpi/select_all.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 196 B |
BIN
app/src/main/res/mipmap-xxhdpi/select_all.png
Normal file
BIN
app/src/main/res/mipmap-xxhdpi/select_all.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 262 B |
BIN
app/src/main/res/mipmap-xxxhdpi/select_all.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/select_all.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 315 B |
|
@ -49,6 +49,8 @@
|
||||||
<string name="show_all">Show all media files</string>
|
<string name="show_all">Show all media files</string>
|
||||||
<string name="all_media">All media</string>
|
<string name="all_media">All media</string>
|
||||||
<string name="folder_view">Switch to folder view</string>
|
<string name="folder_view">Switch to folder view</string>
|
||||||
|
<string name="select_all">Select all</string>
|
||||||
|
<string name="deselect_all">Deselect all</string>
|
||||||
|
|
||||||
<plurals name="folders_deleted">
|
<plurals name="folders_deleted">
|
||||||
<item quantity="one">1 Ordner gelöscht</item>
|
<item quantity="one">1 Ordner gelöscht</item>
|
||||||
|
|
|
@ -49,6 +49,8 @@
|
||||||
<string name="show_all">Show all media files</string>
|
<string name="show_all">Show all media files</string>
|
||||||
<string name="all_media">All media</string>
|
<string name="all_media">All media</string>
|
||||||
<string name="folder_view">Switch to folder view</string>
|
<string name="folder_view">Switch to folder view</string>
|
||||||
|
<string name="select_all">Select all</string>
|
||||||
|
<string name="deselect_all">Deselect all</string>
|
||||||
|
|
||||||
<plurals name="folders_deleted">
|
<plurals name="folders_deleted">
|
||||||
<item quantity="one">1 carpeta eliminada</item>
|
<item quantity="one">1 carpeta eliminada</item>
|
||||||
|
|
|
@ -49,6 +49,8 @@
|
||||||
<string name="show_all">Show all media files</string>
|
<string name="show_all">Show all media files</string>
|
||||||
<string name="all_media">All media</string>
|
<string name="all_media">All media</string>
|
||||||
<string name="folder_view">Switch to folder view</string>
|
<string name="folder_view">Switch to folder view</string>
|
||||||
|
<string name="select_all">Select all</string>
|
||||||
|
<string name="deselect_all">Deselect all</string>
|
||||||
|
|
||||||
<plurals name="folders_deleted">
|
<plurals name="folders_deleted">
|
||||||
<item quantity="one">1 cartella eliminata</item>
|
<item quantity="one">1 cartella eliminata</item>
|
||||||
|
|
|
@ -49,6 +49,8 @@
|
||||||
<string name="show_all">Show all media files</string>
|
<string name="show_all">Show all media files</string>
|
||||||
<string name="all_media">All media</string>
|
<string name="all_media">All media</string>
|
||||||
<string name="folder_view">Switch to folder view</string>
|
<string name="folder_view">Switch to folder view</string>
|
||||||
|
<string name="select_all">Select all</string>
|
||||||
|
<string name="deselect_all">Deselect all</string>
|
||||||
|
|
||||||
<plurals name="folders_deleted">
|
<plurals name="folders_deleted">
|
||||||
<item quantity="one">1 フォルダーを削除しました</item>
|
<item quantity="one">1 フォルダーを削除しました</item>
|
||||||
|
|
|
@ -49,6 +49,8 @@
|
||||||
<string name="show_all">Mostrar todos os ficheiros multimédia</string>
|
<string name="show_all">Mostrar todos os ficheiros multimédia</string>
|
||||||
<string name="all_media">Multimédia</string>
|
<string name="all_media">Multimédia</string>
|
||||||
<string name="folder_view">Alternar para a vista de pastas</string>
|
<string name="folder_view">Alternar para a vista de pastas</string>
|
||||||
|
<string name="select_all">Select all</string>
|
||||||
|
<string name="deselect_all">Deselect all</string>
|
||||||
|
|
||||||
<plurals name="folders_deleted">
|
<plurals name="folders_deleted">
|
||||||
<item quantity="one">1 pasta apagada</item>
|
<item quantity="one">1 pasta apagada</item>
|
||||||
|
|
|
@ -50,6 +50,8 @@
|
||||||
<string name="show_all">Отобразить все медиафайлы</string>
|
<string name="show_all">Отобразить все медиафайлы</string>
|
||||||
<string name="all_media">Все медиафайлы</string>
|
<string name="all_media">Все медиафайлы</string>
|
||||||
<string name="folder_view">Переключиться к виду с папками</string>
|
<string name="folder_view">Переключиться к виду с папками</string>
|
||||||
|
<string name="select_all">Select all</string>
|
||||||
|
<string name="deselect_all">Deselect all</string>
|
||||||
|
|
||||||
<plurals name="folders_deleted">
|
<plurals name="folders_deleted">
|
||||||
<item quantity="one">1 папка удалена</item>
|
<item quantity="one">1 папка удалена</item>
|
||||||
|
|
|
@ -49,6 +49,8 @@
|
||||||
<string name="show_all">Show all media files</string>
|
<string name="show_all">Show all media files</string>
|
||||||
<string name="all_media">All media</string>
|
<string name="all_media">All media</string>
|
||||||
<string name="folder_view">Switch to folder view</string>
|
<string name="folder_view">Switch to folder view</string>
|
||||||
|
<string name="select_all">Select all</string>
|
||||||
|
<string name="deselect_all">Deselect all</string>
|
||||||
|
|
||||||
<plurals name="folders_deleted">
|
<plurals name="folders_deleted">
|
||||||
<item quantity="one">1 mapp borttagen</item>
|
<item quantity="one">1 mapp borttagen</item>
|
||||||
|
|
|
@ -50,6 +50,8 @@
|
||||||
<string name="show_all">Show all media files</string>
|
<string name="show_all">Show all media files</string>
|
||||||
<string name="all_media">All media</string>
|
<string name="all_media">All media</string>
|
||||||
<string name="folder_view">Switch to folder view</string>
|
<string name="folder_view">Switch to folder view</string>
|
||||||
|
<string name="select_all">Select all</string>
|
||||||
|
<string name="deselect_all">Deselect all</string>
|
||||||
|
|
||||||
<plurals name="folders_deleted">
|
<plurals name="folders_deleted">
|
||||||
<item quantity="one">1 folder deleted</item>
|
<item quantity="one">1 folder deleted</item>
|
||||||
|
|
|
@ -49,6 +49,8 @@
|
||||||
<string name="show_all">Show all media files</string>
|
<string name="show_all">Show all media files</string>
|
||||||
<string name="all_media">All media</string>
|
<string name="all_media">All media</string>
|
||||||
<string name="folder_view">Switch to folder view</string>
|
<string name="folder_view">Switch to folder view</string>
|
||||||
|
<string name="select_all">Select all</string>
|
||||||
|
<string name="deselect_all">Deselect all</string>
|
||||||
|
|
||||||
<plurals name="folders_deleted">
|
<plurals name="folders_deleted">
|
||||||
<item quantity="one">1 folder deleted</item>
|
<item quantity="one">1 folder deleted</item>
|
||||||
|
|
Loading…
Reference in a new issue