EditText/TextWatcher 让我回到输入行的开头

EditText/TextWatcher brings me back to the beginning of the input line

public void afterTextChanged(Editable s) {
    if (editText.getText().length() == 12) {
        editText.setText(editText.getText().subSequence(0, editText.getText().length() - 1));
    }

    //problem in this part of code
    if (editText.getText().length() == 2 || editText.getText().length() == 5 || editText.getText().length() == 8) {
        editText.setText(editText.getText()+"/");
    }
}    

如何回到输入行的末尾?

您可以在方法末尾添加:

editText.setSelection(editText.getText().toString().length());

PS: 如果你把你的问题描述的详细一些就更好了,这样会更容易理解。 :)