From 09b96a45e88d4dd1e329e859dd0ad2f288becdee Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 22 Jun 2017 21:05:51 +0200 Subject: [PATCH] make sure the cursor is visible at starting the app --- .../com/simplemobiletools/notes/fragments/NoteFragment.kt | 5 +---- 1 file changed, 1 insertion(+), 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 b1490e0a..00903442 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/fragments/NoteFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/fragments/NoteFragment.kt @@ -111,10 +111,7 @@ class NoteFragment : Fragment() { setColors(config.textColor, config.primaryColor, config.backgroundColor) setTextSize(TypedValue.COMPLEX_UNIT_PX, context.getTextSize()) gravity = getTextGravity() - - if (config.placeCursorToEnd) { - setSelection(text.length) - } + setSelection(if (config.placeCursorToEnd) text.length else 0) } }