add cab buttons for de/selecting all items

This commit is contained in:
tibbi 2016-12-08 21:27:13 +01:00
parent 5c9c0d4ac9
commit 26dfea3adb
16 changed files with 43 additions and 0 deletions

View file

@ -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()

View file

@ -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"

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>