EditText中光标的位置设置
CharSequence text = userName.getText();
if (text instanceof Spannable) {
Spannable spanText = (Spannable)text;
Selection.setSelection(spanText, text.length());
}
}