Cleanup comments & add id to new relative layout

refs #141
This commit is contained in:
Christopher
2017-11-20 22:52:14 +01:00
parent e763f05ec8
commit 0c3bd3a828
2 changed files with 2 additions and 4 deletions

View File

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