将EditText的光标定位到字符的最后面

// 将EditText的光标定位到字符的最后面
 public void setEditTextCursorLocation(EditText editText) {
    CharSequence text = editText.getText();
    if (text instanceof Spannable) {
       Spannable spanText = (Spannable) text;
       Selection.setSelection(spanText, text.length());
    }
 }

原文地址:https://www.cnblogs.com/xingfuzzhd/p/2886847.html