Android EditText获取光标位置并插入字符删除字符
1.获取到光标所在的位置
int index = editText.getSelectionStart();
2.在光标的地方插入字符
int index = editText.getSelectionStart();
Editable editable = editText.getText();
editable.insert(index, "哈哈哈");
3.删除光标前的字符(光标在哪里从哪里开始删除)
int index = editText.getSelectionStart();
Editable editable = editText.getText();
editable.delete(index-1, index);