diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/SettingsActivity.kt index a4d1422e..0d34e553 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/SettingsActivity.kt @@ -48,6 +48,7 @@ class SettingsActivity : SimpleActivity() { setupCustomizeWidgetColors() updateTextColors(settings_scrollview) setupSectionColors() + setupAddNewChecklistItemsTop() invalidateOptionsMenu() } @@ -251,4 +252,12 @@ class SettingsActivity : SimpleActivity() { config.useIncognitoMode = settings_use_incognito_mode.isChecked } } + + private fun setupAddNewChecklistItemsTop() { + settings_add_checklist_top.isChecked = config.addNewChecklistItemsTop + settings_add_checklist_top_holder.setOnClickListener { + settings_add_checklist_top.toggle() + config.addNewChecklistItemsTop = settings_add_checklist_top.isChecked + } + } } diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/pro/fragments/ChecklistFragment.kt b/app/src/main/kotlin/com/simplemobiletools/notes/pro/fragments/ChecklistFragment.kt index 06248352..8fb27dce 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/pro/fragments/ChecklistFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/pro/fragments/ChecklistFragment.kt @@ -136,14 +136,21 @@ class ChecklistFragment : NoteFragment(), ChecklistItemsListener { private fun showNewItemDialog() { NewChecklistItemDialog(activity as SimpleActivity) { titles -> var currentMaxId = items.maxBy { item -> item.id }?.id ?: 0 + val newItems = ArrayList() titles.forEach { title -> title.split("\n").map { it.trim() }.filter { it.isNotBlank() }.forEach { row -> - items.add(ChecklistItem(currentMaxId + 1, row, false)) + newItems.add(ChecklistItem(currentMaxId + 1, row, false)) currentMaxId++ } } + if (config?.addNewChecklistItemsTop == true) { + items.addAll(0, newItems) + } else { + items.addAll(newItems) + } + saveNote() setupAdapter() } diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/pro/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/notes/pro/helpers/Config.kt index fec09284..9f3da2ad 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/pro/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/pro/helpers/Config.kt @@ -89,4 +89,8 @@ class Config(context: Context) : BaseConfig(context) { var fontSizePercentage: Int get() = prefs.getInt(FONT_SIZE_PERCENTAGE, 100) set(fontSizePercentage) = prefs.edit().putInt(FONT_SIZE_PERCENTAGE, fontSizePercentage).apply() + + var addNewChecklistItemsTop: Boolean + get() = prefs.getBoolean(ADD_NEW_CHECKLIST_ITEMS_TOP, false) + set(addNewCheckListItemsTop) = prefs.edit().putBoolean(ADD_NEW_CHECKLIST_ITEMS_TOP, addNewCheckListItemsTop).apply() } diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/pro/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/notes/pro/helpers/Constants.kt index 5d6d5f0b..2a439d41 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/pro/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/pro/helpers/Constants.kt @@ -31,6 +31,7 @@ const val USE_INCOGNITO_MODE = "use_incognito_mode" const val LAST_CREATED_NOTE_TYPE = "last_created_note_type" const val MOVE_DONE_CHECKLIST_ITEMS = "move_undone_checklist_items" // it has been replaced from moving undone items at the top to moving done to bottom const val FONT_SIZE_PERCENTAGE = "font_size_percentage" +const val ADD_NEW_CHECKLIST_ITEMS_TOP = "add_new_checklist_items_top" // gravity const val GRAVITY_LEFT = 0 diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index d309c888..9e696cee 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -244,6 +244,29 @@ + + + + + + تفعيل التفاف الخط استخدام وضع التصفح المتخفي للوحات المفاتيح Move done checklist items to the bottom + Add new checklist items at the top قائمة تدقيق diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index 0b926bbe..21d875ee 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -54,6 +54,7 @@ Cız sarğısını göstər Use Incognito mode of keyboards Move done checklist items to the bottom + Add new checklist items at the top Checklist diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index ffe36631..e9045716 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -54,6 +54,7 @@ Povolit zalamování řádků Použít Inkognito mód klávesnic Přesunout splněné položky seznamu položek nadol + Add new checklist items at the top Seznam položek diff --git a/app/src/main/res/values-cy/strings.xml b/app/src/main/res/values-cy/strings.xml index 09cb5196..eed22902 100644 --- a/app/src/main/res/values-cy/strings.xml +++ b/app/src/main/res/values-cy/strings.xml @@ -54,6 +54,7 @@ Galluogi amlapio llinellau Defnyddio modd cyfrinachol bysellfyrddau Move done checklist items to the bottom + Add new checklist items at the top Rhestr wirio diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 8ef6d25d..9cd56b5e 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -54,6 +54,7 @@ Aktiver tekstombrydning Anvend inkognito-tilstand til tastatur Move done checklist items to the bottom + Add new checklist items at the top Tjekliste diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 5eed9fdd..cecab30f 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -54,6 +54,7 @@ Zeilenumbruch aktivieren Benutze den Inkognitomodus von Tastaturen Verschiebe erledigte Checklisteneinträge nach unten + Add new checklist items at the top Checkliste diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 420d9772..0ae8ae9a 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -54,6 +54,7 @@ Ενεργοποίηση αναδίπλωσης γραμμής Χρήση λειτουργίας Incognito πληκτρολόγιου Μετακίνηση ανεπιτυχών λίστας ελέγχου στο επάνω μέρος + Add new checklist items at the top Λίστα ελέγχου diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 6a16e6d8..71028ac2 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -54,6 +54,7 @@ Activar ajuste de línea Usar modo incógnito de los teclados Mover ítems completados al final de la lista + Add new checklist items at the top Lista diff --git a/app/src/main/res/values-fa/strings.xml b/app/src/main/res/values-fa/strings.xml index f59e0c24..6288ace5 100644 --- a/app/src/main/res/values-fa/strings.xml +++ b/app/src/main/res/values-fa/strings.xml @@ -54,6 +54,7 @@ فعال کردن پیچیدن خط استفاده از حالت ناشناس کیبورد‌ها جابه‌جایی موارد انجام شده فهرست نشان‌دار به پایین + Add new checklist items at the top فهرست نشان‌دار diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 4ed38c6b..62d0b04a 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -54,6 +54,7 @@ Ota käyttöön automaattinen rivitys Käytä näppäimistöjen Incognito-tilaa Siirrä tekemättömät kohdat muistilistasta ylimmäksi + Add new checklist items at the top Muistilista diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index f7555f84..84dc0b89 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -54,6 +54,7 @@ Activer le retour à la ligne Utiliser le mode incognito des claviers Déplacer les éléments de cheklist inachevés en haut + Add new checklist items at the top Checklist diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index f3957db3..082a4598 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -54,6 +54,7 @@ Habilitar sangrado de liña Usar o modo incógnito dos teclados Mover os elementos dunha lista de verificación non rematada a arriba + Add new checklist items at the top Lista de verificación diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index e056b0f0..dd1c9b3e 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -54,6 +54,7 @@ Omogući omotavanje linije Use Incognito mode of keyboards Move done checklist items to the bottom + Add new checklist items at the top Spisak diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 130fd2c6..ca7182e3 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -54,6 +54,7 @@ Enable line wrap Use Incognito mode of keyboards Move done checklist items to the bottom + Add new checklist items at the top Checklist diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml index 9def62b9..07d0c73d 100644 --- a/app/src/main/res/values-id/strings.xml +++ b/app/src/main/res/values-id/strings.xml @@ -54,6 +54,7 @@ Aktifkan baris berlibat Gunakan mode papan ketik incognito Pindah checklist yang belum selesai ke urutan atas + Add new checklist items at the top Checklist diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 9def62b9..07d0c73d 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -54,6 +54,7 @@ Aktifkan baris berlibat Gunakan mode papan ketik incognito Pindah checklist yang belum selesai ke urutan atas + Add new checklist items at the top Checklist diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 63848c9d..c5077c72 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -54,6 +54,7 @@ Abilita a capo automatico Usa la modalità incognito per le tastiere Sposta gli elementi non spuntati in cima + Add new checklist items at the top Scaletta diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 73a2d1f8..7e4d4d13 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -54,6 +54,7 @@ 行の折り返しを有効にする キーボードのシークレットモードを使用する チェックリストの未完了リストを上に移動 + Add new checklist items at the top チェックリスト diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 8eed40d7..5e059c5a 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -54,6 +54,7 @@ naudoti eilutės perkėlimą Use Incognito mode of keyboards Move done checklist items to the bottom + Add new checklist items at the top Kontrolinis sąrašas diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 27585714..5b84a521 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -54,6 +54,7 @@ Automatische terugloop inschakelen Incognito-modus van toetsenbord gebruiken Afgewerkte items naar onderen verplaatsen + Add new checklist items at the top Lijst diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index c24db546..edf5e855 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -54,6 +54,7 @@ Włącz zawijanie linii Używaj trybu incognito klawiatury Przesuwaj na dół wykonane elementy listy kontrolnej + Dodawaj na górze nowe elementy listy kontrolnej Lista kontrolna diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 6a033fbc..b7f0eac0 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -54,6 +54,7 @@ Ativar quebra de linha Usar o teclado no modo de Navegação Anônima Mover itens completos da lista de verificação para o final + Add new checklist items at the top Lista de verificação diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 39557e6d..c34fd6bc 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -54,6 +54,7 @@ Ativar quebra de linha Utilizar modo incógnito no teclado Mover itens não realizados para o topo + Add new checklist items at the top Lista de verificação diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 04b3ab9d..db207880 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -54,6 +54,7 @@ Переносить строки Использовать режим инкогнито для клавиатур Move done checklist items to the bottom + Add new checklist items at the top Список diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index a28f0d9c..e9ec1430 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -54,6 +54,7 @@ Povoliť zalamovanie riadkov Použiť Inkognito mód klávesníc Presunúť splnené položky zo zoznamu položiek na spodok + Add new checklist items at the top Zoznam položiek diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 6d9a3cc0..cf4de6dc 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -54,6 +54,7 @@ Aktivera radbrytning Använd tangentbordets inkognitoläge Move done checklist items to the bottom + Add new checklist items at the top Checklista diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index b9674290..a4508e63 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -54,6 +54,7 @@ Sözcük kaydırmayı etkinleştir Klavyelerin Gizli modunu kullan Tamamlanmamış yapılacak listesi öğelerini en üste taşı + Add new checklist items at the top Yapılacak listesi diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 5d796c54..293113bc 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -54,6 +54,7 @@ Продовжувати друк з нового рядка Використовувати режим Приватності в клавіатурі Поміщати вкінець виконані позиції у списку + Add new checklist items at the top Список diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 67b9978f..d1cdcf0b 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -54,6 +54,7 @@ 启用行折叠 对于键盘使用隐私模式 移动未完成的清单至顶端 + Add new checklist items at the top 清单 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index db918eb9..569e2f5f 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -54,6 +54,7 @@ 自動換行 使用無痕模式的鍵盤 將未完成的核對清單項目移動至頂端 + Add new checklist items at the top 核對清單 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c33563c4..ca32a680 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -54,6 +54,7 @@ Enable line wrap Use Incognito mode of keyboards Move done checklist items to the bottom + Add new checklist items at the top Checklist