edittext.addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable arg0) { edittext.setSelection(arg0.length());//将光标移至文字末尾 } @Override public void beforeTextChanged(CharSequence cs, int arg1, int arg2, int arg3) { } @Override public void onTextChanged(CharSequence cs, int arg1, int arg2, int arg3) { } });
EditText将光标移至文字末尾
最新推荐文章于 2021-05-25 19:14:17 发布