1.获取光标位置 int index = editText.getSelectionStart(); 2.在光标处插入字符 int index = editText.getSelectionStart(); Editable editable = editText.getText(); editable.insert(index, "aaaa"); 3.删除光标前字符 int index = editText.getSelectionStart(); Editable editable…
editText.addTextChangedListener(new TextWatcher(){ @Override public void afterTextChanged(Editable arg0) { } @Override public void beforeTextChanged(CharSequence s, int start, int count, …