mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed inserting emoji/digit at the current cursor position instead of at the end
This commit is contained in:
parent
990549eb24
commit
12e6de52a8
1 changed files with 3 additions and 3 deletions
|
|
@ -179,9 +179,9 @@ fun AppCompatEditText.removeCharacterAtPosition() {
|
|||
|
||||
@UiThread
|
||||
fun AppCompatEditText.addCharacterAtPosition(character: String) {
|
||||
val newValue = "${text}$character"
|
||||
setText(newValue)
|
||||
setSelection(newValue.length)
|
||||
val start = selectionStart
|
||||
text?.insert(start, character)
|
||||
setSelection(start + character.length)
|
||||
}
|
||||
|
||||
@UiThread
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue