diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/pro/adapters/ChecklistAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/notes/pro/adapters/ChecklistAdapter.kt index d3511954..2460c0f9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/pro/adapters/ChecklistAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/pro/adapters/ChecklistAdapter.kt @@ -60,6 +60,8 @@ class ChecklistAdapter(activity: BaseSimpleActivity, var items: ArrayList moveSelectedItemsToTop() + R.id.cab_move_to_bottom -> moveSelectedItemsToBottom() R.id.cab_rename -> renameChecklistItem() R.id.cab_delete -> deleteSelection() } @@ -145,6 +147,31 @@ class ChecklistAdapter(activity: BaseSimpleActivity, var items: ArrayList + val position = items.indexOfFirst { it.id == keys.value } + val tempItem = items[position] + items.removeAt(position) + items.add(0, tempItem) + } + notifyDataSetChanged() + listener?.saveChecklist() + } + + private fun moveSelectedItemsToBottom() { + selectedKeys.withIndex() + .forEach { keys -> + val position = items.indexOfFirst { it.id == keys.value } + val tempItem = items[position] + items.removeAt(position) + items.add(items.size, tempItem) + } + notifyDataSetChanged() + listener?.saveChecklist() + } + private fun getItemWithKey(key: Int): ChecklistItem? = items.firstOrNull { it.id == key } private fun getSelectedItems() = items.filter { selectedKeys.contains(it.id) } as ArrayList diff --git a/app/src/main/res/drawable-anydpi/ic_move_to_bottom.xml b/app/src/main/res/drawable-anydpi/ic_move_to_bottom.xml new file mode 100644 index 00000000..c8adf15c --- /dev/null +++ b/app/src/main/res/drawable-anydpi/ic_move_to_bottom.xml @@ -0,0 +1,11 @@ + + + diff --git a/app/src/main/res/drawable-anydpi/ic_move_to_top.xml b/app/src/main/res/drawable-anydpi/ic_move_to_top.xml new file mode 100644 index 00000000..4c8580d3 --- /dev/null +++ b/app/src/main/res/drawable-anydpi/ic_move_to_top.xml @@ -0,0 +1,11 @@ + + + diff --git a/app/src/main/res/drawable-hdpi/ic_move_to_bottom.png b/app/src/main/res/drawable-hdpi/ic_move_to_bottom.png new file mode 100644 index 00000000..62b6ae78 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_move_to_bottom.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_move_to_top.png b/app/src/main/res/drawable-hdpi/ic_move_to_top.png new file mode 100644 index 00000000..5f64fafc Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_move_to_top.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_move_to_bottom.png b/app/src/main/res/drawable-mdpi/ic_move_to_bottom.png new file mode 100644 index 00000000..36f2a775 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_move_to_bottom.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_move_to_top.png b/app/src/main/res/drawable-mdpi/ic_move_to_top.png new file mode 100644 index 00000000..0e6852f4 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_move_to_top.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_move_to_bottom.png b/app/src/main/res/drawable-xhdpi/ic_move_to_bottom.png new file mode 100644 index 00000000..096fce2f Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_move_to_bottom.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_move_to_top.png b/app/src/main/res/drawable-xhdpi/ic_move_to_top.png new file mode 100644 index 00000000..57f42d19 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_move_to_top.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_move_to_bottom.png b/app/src/main/res/drawable-xxhdpi/ic_move_to_bottom.png new file mode 100644 index 00000000..d9b8f8b9 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_move_to_bottom.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_move_to_top.png b/app/src/main/res/drawable-xxhdpi/ic_move_to_top.png new file mode 100644 index 00000000..22629474 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_move_to_top.png differ diff --git a/app/src/main/res/menu/cab_checklist.xml b/app/src/main/res/menu/cab_checklist.xml index 846ca634..668197c7 100644 --- a/app/src/main/res/menu/cab_checklist.xml +++ b/app/src/main/res/menu/cab_checklist.xml @@ -1,6 +1,16 @@ + + إضافة عناصر قائمة تدقيق جديدة قائمة التدقيق فارغة Remove done items + Move to top + Move to bottom تصدير جميع الملاحظات كملفات diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index 7d9b2696..0d9f5505 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -56,6 +56,8 @@ Add new checklist items The checklist is empty Remove done items + Move to top + Move to bottom Bütün qeydləri fayl şəklində çıxar diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 24b45f43..0384f8cb 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -56,6 +56,8 @@ Přidat do seznamu nové položky Seznam položek je prázdný Remove done items + Move to top + Move to bottom Exportovat všechny poznámky jako soubory diff --git a/app/src/main/res/values-cy/strings.xml b/app/src/main/res/values-cy/strings.xml index 9d98224d..fa14a758 100644 --- a/app/src/main/res/values-cy/strings.xml +++ b/app/src/main/res/values-cy/strings.xml @@ -56,6 +56,8 @@ Ychwanegu eitemau newydd at restr wirio Mae\'r rhestr wirio yn wag Remove done items + Move to top + Move to bottom Allforio pob nodyn fel ffeil diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 40e8d1ce..53865748 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -56,6 +56,8 @@ Føj nye punkter til tjeklisten Tjeklisten er tom Remove done items + Move to top + Move to bottom Eksporter alle noter som filer diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index c42e7dd7..b59f7479 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -56,6 +56,8 @@ Neue Checklisteneinträge hinzufügen Die Checkliste ist leer Remove done items + Move to top + Move to bottom Alle Notizen als Dateien exportieren diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 326d144a..0ae274e9 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -56,6 +56,8 @@ Προσθήκη νέων στοιχείων λίστας ελέγχου Η λίστα ελέγχου είναι κενή Remove done items + Move to top + Move to bottom Εξαγωγή όλων των σημειώσεων ως αρχεία diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index d39a8230..ea44ce12 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -56,6 +56,8 @@ Añadir nuevos items a la lista La lista está vacía Remove done items + Move to top + Move to bottom Exportar todas las notas como archivos diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 588f08bd..2efc2365 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -56,6 +56,8 @@ Ajouter de nouveaux éléments La checklist est vide Remove done items + Move to top + Move to bottom Exporter toutes les notes en tant que fichiers diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index 79239339..de51d9d1 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -56,6 +56,8 @@ Engadir elementos a unha nova lista de verificación A lista de verificación está baleira Remove done items + Move to top + Move to bottom Exportar todas as notas como ficheiros diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index da44924a..943df4ff 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -56,6 +56,8 @@ Dodajte nove stavke na spisak Spisak je prazan Remove done items + Move to top + Move to bottom Izvezi sve bilješke kao datoteke diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 74af6462..c768b421 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -56,6 +56,8 @@ Add new checklist items The checklist is empty Remove done items + Move to top + Move to bottom Export all notes as files diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml index 7bc2c54f..433bedc6 100644 --- a/app/src/main/res/values-id/strings.xml +++ b/app/src/main/res/values-id/strings.xml @@ -56,6 +56,8 @@ Tambah item checklist baru Checklist kosong Remove done items + Move to top + Move to bottom Ekspor semua catatan ke berkas diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 7bc2c54f..433bedc6 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -56,6 +56,8 @@ Tambah item checklist baru Checklist kosong Remove done items + Move to top + Move to bottom Ekspor semua catatan ke berkas diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 442a88e4..bee6b69a 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -56,6 +56,8 @@ Aggiungi nuovi elementi La scaletta è vuota Remove done items + Move to top + Move to bottom Esporta le note come file diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 95f3096a..649fbdd1 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -56,6 +56,8 @@ 新しいチェックリスト項目を追加 チェックリストが空です Remove done items + Move to top + Move to bottom すべてのメモをファイルとしてエクスポート diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 8d3e0b15..5daa0558 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -56,6 +56,8 @@ Pridėti naujus kontrolinio sąrašo objektus Kontrolinis sąršas tuščias Remove done items + Move to top + Move to bottom Eksportuoti visus užrašus kaip bylas diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 6f51f564..2ed49414 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -56,6 +56,8 @@ Items toevoegen De lijst is leeg Afgeronde items wissen + Move to top + Move to bottom Alle notities naar bestanden exporteren diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index dcd5bb98..966bd434 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -56,6 +56,8 @@ Add new checklist items The checklist is empty Remove done items + Move to top + Move to bottom Eksportuj wszystkie notatki jako pliki diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index e10c0a85..fe525633 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -56,6 +56,8 @@ Adicionar novos itens de lista de verificação A lista de verificação está vazia Remove done items + Move to top + Move to bottom Exportar todas as notas como arquivo diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index e245d344..858a6660 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -56,6 +56,8 @@ Adicionar itens à lista de verificação A lista está vazia Remover itens realizados + Move to top + Move to bottom Exportar todas as notas como ficheiros diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index f2f88b9a..8c84ef63 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -56,6 +56,8 @@ Добавить позиции в список Список пуст Remove done items + Move to top + Move to bottom Экспортировать все заметки в файлы diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index ea1075ac..4288962c 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -56,6 +56,8 @@ Pridať do zoznamu nové položky Zoznam položiek je prázdny Odstrániť splnené položky + Move to top + Move to bottom Exportovať všetky poznámky ako súbory diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 65cd3c46..cf99e37b 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -56,6 +56,8 @@ Lägg till nya checklisteobjekt Checklistan är tom Remove done items + Move to top + Move to bottom Exportera alla anteckningar som filer diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index b492a6d4..18bdad40 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -56,6 +56,8 @@ Yeni yapılacak listesi öğeleri ekle Yapılacak listesi boş Remove done items + Move to top + Move to bottom Tüm notları dosya olarak dışa aktar diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 5819bd6c..bb8757fd 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -56,6 +56,8 @@ Додати нові позиції у списку Список порожній Remove done items + Move to top + Move to bottom Експортувати всі нотатки як файли diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index cb6a3a66..d8907f7b 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -56,6 +56,8 @@ 添加新的清单项目 清单为空 Remove done items + Move to top + Move to bottom 以文件导出所有笔记 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 35814d14..83ace3db 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -56,6 +56,8 @@ 新增新的核對清單項目 核對清單為空白 Remove done items + Move to top + Move to bottom 將全部筆記匯出成檔案 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 447b1549..430db9e7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -56,6 +56,8 @@ Add new checklist items The checklist is empty Remove done items + Move to top + Move to bottom Export all notes as files