mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-06-05 17:00:23 +02:00
fix keyboard showing at app startup
This commit is contained in:
@ -3,7 +3,6 @@ package com.simplemobiletools.notes.fragments
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Typeface
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import android.text.Editable
|
||||
import android.text.Selection
|
||||
import android.text.TextWatcher
|
||||
@ -89,6 +88,11 @@ class NoteFragment : androidx.fragment.app.Fragment() {
|
||||
setText(fileContents)
|
||||
}
|
||||
skipTextUpdating = false
|
||||
|
||||
if (config.showKeyboard) {
|
||||
requestFocus()
|
||||
}
|
||||
|
||||
setSelection(if (config.placeCursorToEnd) text.length else 0)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user