From 0c3bd3a828f2607c59fbb021d8362c138235e868 Mon Sep 17 00:00:00 2001 From: Christopher Date: Mon, 20 Nov 2017 22:52:14 +0100 Subject: [PATCH] Cleanup comments & add id to new relative layout refs #141 --- .../com/simplemobiletools/notes/fragments/NoteFragment.kt | 3 --- app/src/main/res/layout/fragment_note.xml | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/fragments/NoteFragment.kt b/app/src/main/kotlin/com/simplemobiletools/notes/fragments/NoteFragment.kt index c5edd22a..70d40594 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/fragments/NoteFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/fragments/NoteFragment.kt @@ -135,14 +135,11 @@ class NoteFragment : Fragment() { } private fun removeTextWatcher() { - //Avoid memory leak view.notes_view.removeTextChangedListener(textWatcher) } private fun setWordCounter(text: Editable) { - //Replace new lines with space val wordArray = text.toString().replace("\n", " ").split(" ") - //Count only items which are not empty notes_counter.text = wordArray.count { it.isNotEmpty() }.toString() } diff --git a/app/src/main/res/layout/fragment_note.xml b/app/src/main/res/layout/fragment_note.xml index 037bdbc9..d7a114d8 100644 --- a/app/src/main/res/layout/fragment_note.xml +++ b/app/src/main/res/layout/fragment_note.xml @@ -13,6 +13,7 @@