searching for strings in a given note, then highlighting and looping through the string occurrences with some arrows.

This commit is contained in:
Pavol Franek
2020-03-24 08:46:59 +01:00
parent 716953ec9d
commit 8b20ccde0b
3 changed files with 36 additions and 7 deletions

View File

@ -77,7 +77,8 @@ class TextFragment : NoteFragment() {
if (config!!.autosaveNotes) {
saveText(false)
}
view.text_note_view.removeTextChangedListener(textWatcher)
removeTextWatcher()
}
override fun setMenuVisibility(menuVisible: Boolean) {
@ -154,9 +155,12 @@ class TextFragment : NoteFragment() {
view.notes_counter.beGone()
}
view.text_note_view.addTextChangedListener(textWatcher)
setTextWatcher()
}
fun setTextWatcher() = view.text_note_view.addTextChangedListener(textWatcher)
fun removeTextWatcher() = view.text_note_view.removeTextChangedListener(textWatcher)
fun updateNoteValue(value: String) {
note?.value = value
}