myInput.setText(myInput.getText().replace(myInput.getSelectionStart(), myInput.getSelectionEnd(), myText));
myInput.setSelection(myInput.getSelectionStart() + myText.length(), myInput.getSelectionEnd() + myText.length())
I ask because I think this code is much longer than it needs to be - Is there something shorter like myInput.insertTextAtCursor(myText)
or is this the way everyone does it?