1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

DROID Editor | Fix | Enable auto-correct by fixing IME input and action modes (#283)

This commit is contained in:
Brayan Oliveira 2023-08-17 15:28:20 -03:00 committed by GitHub
parent e1b04ca7d0
commit c6cb71ea05
Signed by: github
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,7 @@ import android.R.id.paste
import android.content.Context
import android.graphics.Canvas
import android.os.Parcelable
import android.text.InputType
import android.text.Spanned
import android.text.TextWatcher
import android.text.util.Linkify
@ -98,7 +99,12 @@ class TextInputWidget : AppCompatEditText {
}
fun enableEditMode() {
multilineIme(action = inputAction.toIMECode())
setRawInputType(
InputType.TYPE_CLASS_TEXT
or InputType.TYPE_TEXT_FLAG_CAP_SENTENCES
or InputType.TYPE_TEXT_FLAG_AUTO_CORRECT
)
imeOptions = inputAction.toIMECode()
setTextIsSelectable(true)
inReadMode = false
}