标签:android span selection ble index tab ext select start
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);
Android EditText获取光标位置并插入字符删除字符
标签:android span selection ble index tab ext select start
原文地址:http://www.cnblogs.com/dingxiansen/p/7590636.html