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 uburoiubu
parent ed9f41ac02
commit 7c6b4684d5
No known key found for this signature in database
GPG key ID: C8FB80E0A595FBB6

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
}