Skip to content

Commit 0c3bd3a

Browse files
committed
Cleanup comments & add id to new relative layout
refs #141
1 parent e763f05 commit 0c3bd3a

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

app/src/main/kotlin/com/simplemobiletools/notes/fragments/NoteFragment.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,11 @@ class NoteFragment : Fragment() {
135135
}
136136

137137
private fun removeTextWatcher() {
138-
//Avoid memory leak
139138
view.notes_view.removeTextChangedListener(textWatcher)
140139
}
141140

142141
private fun setWordCounter(text: Editable) {
143-
//Replace new lines with space
144142
val wordArray = text.toString().replace("\n", " ").split(" ")
145-
//Count only items which are not empty
146143
notes_counter.text = wordArray.count { it.isNotEmpty() }.toString()
147144
}
148145

app/src/main/res/layout/fragment_note.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
<RelativeLayout
1515
android:layout_width="match_parent"
16+
android:id="@+id/notes_relativelayout"
1617
android:layout_height="wrap_content">
1718

1819
<com.simplemobiletools.commons.views.MyEditText
@@ -31,7 +32,7 @@
3132
android:layout_width="wrap_content"
3233
android:layout_height="wrap_content"
3334
android:textStyle="italic"
34-
android:text="123"
35+
android:text=""
3536
android:padding="5dp"
3637
android:layout_alignParentBottom="true"
3738
android:layout_alignParentEnd="true"

0 commit comments

Comments
 (0)