0

I have a custom keyboard, fixed on screen, that edits an EditText.

 myKeyboard.setListener(new CustomKeyboard.KeyboardListener() {
        @Override
        public void onChanged(char key, String value)
        {
            myEditText.setText(value);
        }

I have disabled the default keyboard using this solution, which works perfectly.

The only problem is that, when I move the cursor inside the EditText, whatever I type is added to the end of the string, not considering the cursor position, which moves again at the start of the EditText. How can I fix this?

Community
  • 1
  • 1
Koosshh56
  • 317
  • 3
  • 17

1 Answers1

0

Try getSelectionEnd() method of EditText

myEditText.getSelectionEnd(); 
Ganesh AB
  • 4,652
  • 2
  • 18
  • 29