public void SelectionLast(EditText nn){ //光标位置 CharSequence text = nn.getText(); if (text instanceof Spannable) { Spannable spanText = (Spannable)text; Selection.setSelection(spanText, text.length()); } }
以上方法可以方法可以解决这个问题!